oscode

why won't this code run right? Compiled fine with nasm but won't run.


[BITS 16]

[ORG 0]

jmp main

tester db ''

message db 'This is the JesseOS in low RES',13,10,0

message2 db 'This is the JesseOS in high RES',13,10,0

reboot:


db 0EAH


dw 0000h


dw 0FFFFh


RET

waittillkey:


mov ah,0


int 16h


RET

changeres:


mov ax,4F02h


mov bx,107h


int 0x10


RET

%macro mprintf 1

mov eax,[%1]

mov [tester],eax

call printf

%endmacro

printf:


mov si,tester


print@:


lodsb


or al,al


jz done@


mov ah,0eh


mov bx,0007


int 0x10


jmp print@


done@:


RET

main:

mov ax,0x7c0

mov ds,ax

cli

mov ax,0x9000

mov ss,ax

mov sp,0xffff

sti

mprintf message

call waittillkey

call changeres

mprintf message2

call waittillkey

call reboot


times 510-($-$$) db 0

dw 0xAA55






Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories