c0n, you probably haven't knoticed yet, but Mangix is a moron who has trouble with VisualBasic. Anyone know whats wrong with the following code? It doesn't do jack shit except hang.
;-----------------------------------------------------------------------------------------
; These are my string constats. 0x01 is a smily face, 0x0D is a CR, 0x0A is a LF, and 0x00
; is a null terminator. Anything in quotes is the text of the string.
msgwelcome db "Welcome to JoeOS by Joe[x86]! ", 0x01, 0x0D, 0x0A, 0x00
msghalt db "Bootloader halted.", 0x0D, 0x0A, 0x00
msgshutdownsafe db "It is now safe to shutdown your computer.", 0x0D, 0x0A, 0x00
msgnewline db 0x0D, 0x0A, 0x00
; ----------------------------------------------------------------------------------------
; Here is the information that shows the processor where the origin of the bootloader is,
; and how many bits we're using.
[BITS 16] ; This tells us we are using 16 Bits
[ORG 0x0] ; Origin = 0x00
jmp 0x7c0:start ; Set start to 0x07C0 and start the procecdure "start" there
;-----------------------------------------------------------------------------------------
; This is my start procedure. This initiates the operating system environment, and calls
; my print procedure to display some messages
start:
xor ax, ax
mov ax, cs
mov ds, ax
mov es, ax
mov fs, ax
; Here I set the value of ax, ds, es, and fs to 0. I cant access these directly, so I xor
; ax to make it zero and move it to each of them.
mov si, msgwelcome
call print
; "Welcome to JoeOS by Joe[x86]! (smile)"
mov si, msghalt
callcprint
; "Bootloader halted."
mov si, msgshutdownsafe
call print
; "It is now safe to shutdown your computer."
jmp $ ; Hang
times 510-($-$$) db 0 ; This fills the rest of unused space with 0s
dw 0xAA55 ; Include bootloader signature
;-----------------------------------------------------------------------------------------
; Here is the print procedure I will be using. Written by Warrior[x86]. Broken. =/.
print:
mov ah, 0x10
mov bh, 0x00 ; Page = 0
mov bl, 0x09 ; Color = Blue
lodsb ; Load SI into AL
cmp al, 0 ; If we hit a null terminator..
je .Done ; Go to the label ".Done"
int 0x10 ; print the character
jmp print ; print until the whole string is printed
.Done: ; The label ".Done"
ret
EDIT -
OMG WTF I FOUND DEE PROBLEM IT IS 528 KB NOT 512 WTF HELP ME FIX IT WAR!~