Ich hab mal versucht dass hier gepostete in meinen Kernel zu verpacken:
mov ax, 0x1000
mov ds, ax
mov es, ax
start:
mov ah,0x0
mov al,0x3
int 0x10 ; Textmodus, 80 x 25, 16 Farben
mov si, _s_noos_logo
mov ah, 0x03
call _v_noos_tprintf
mov si, _s_noos_jmp_good
mov ah, 0x0A
call _v_noos_tprintf
mov si,msg_boot
mov ah, 0x07
call _v_noos_tprintf
call _v_noos_getkey
jmp _v_noos_reboot
_s_noos_logo db "[ NoOS ]",0
_s_noos_jmp_good db " Jump into kernel successful",13,10,0
msg_boot db "Press any key...",10,0
; Funktionen
;%%%%%%%
;AL = Farbe
;SI = String
;==========
_v_noos_clrstrout:
lodsb
or al,al
jz short _v_noos_clrstroutd
mov cx, 1
xor bh, bh
mov ah,0x09
int 0x10
jmp _v_noos_clrstrout
_v_noos_clrstroutd
retn
;%%%%%%%%
;SI = String
;============
_v_noos_stdstrout:
lodsb
or al,al
jz short _v_noos_stdstroutd
mov ah,0x0E
mov bx,0x0007
int 0x10
jmp _v_noos_stdstrout
_v_noos_stdstroutd:
retn
_v_noos_getkey:
mov ah, 0
int 0x16
ret
_v_noos_reboot:
jmp 0xffff:0x0000
;%%%%%%%%%%
;AH = Farbe
;SI = String
;===============
_v_noos_tprintf:
lodsb
or al,al
jz short _v_noos_tprintfd
mov cx, 1
xor bh, bh
mov bl, ah
mov ah, 0x09
int 0x10
call _v_noos_inccrs
jmp _v_noos_tprintf
_v_noos_tprintfd:
call _v_noos_inccrs
retn
;%%%%%%%%%%%%
;AL = Zeichen
;==================
_v_noos_inccrs:
cmp al,10
jz _v_noos_incrsa
call _v_noos_get_cursor_pos
cmp dl,79
jz _v_noos_incrsa
inc dl
call _v_noos_set_cursor_pos
retn
_v_noos_incrsa:
call _v_noos_pnewline
retn
;%%%%%%%%%%%%%
_v_noos_pnewline:
call _v_noos_get_cursor_pos
inc dh,
xor dl,dl
call _v_noos_set_cursor_pos
retn
;%%%%%%%%%%
;DL = Spalte
;DH = Reihe
;===============
_v_noos_set_cursor_pos:
push ax
push bx
xor bh,bh
mov ah,0x02
int 0x10
pop bx
pop ax
retn
;%%%%%%%%%%%%%
;ret: DL = Spalte
;ret DH = Reihe
;===================
_v_noos_get_cursor_pos:
push ax
push bx
xor bh,bh
mov ah,0x03
int 0x10
push bx
push ax
retn
Unlustigerweise wird jedoch nur ein '[' ausgegeben.