Just wandering , do you think this code is safe ?
Thanks
Code: Select all
declare sub printc naked(src as byte)
sub main naked()
asm
.code16
end asm
const s = "Hello World !"
dim i as ubyte
dim p as byte ptr = cptr(byte ptr,@s)
for i = 0 to len(s)
printc p[i]
next i
asm
'.code16
int &h20
end asm
end sub
sub printc(src as byte)
asm
'.code16
push bp
mov bp,sp
mov ah,&h0e
mov al,[bp+4]
int &h10
pop bp
ret
end asm
end sub
Code: Select all
fbc -R -c test.bas
ld -e _MAIN@0 -Ttext 0x100 --oformat=binary -o test.com test.o
test
pause