I have got a piece of code which runs in realmode and printf a message on screen,I am using Dosbox 0.7 as my execution environment .Below is the code
jmp 0x7c0:start
start:
mov ax, cs ; set up segments
mov ds, ax
mov es, ax
mov al,03h
mov ah,0
int 10h
welcome db "This is insane now"
mov si, welcome
call print_string
print_string:
lodsb ; grab a byte from SI
or al, al ; logical or AL by itself
jz .done ; if the result is zero, get out
mov ah, 0x0E
int 0x10 ; otherwise, print out the character!
jmp print_string
.done:
ret
I am able assemble this code fine but when I run this ,It just hangs there and a message I can see in linux terminal
Illegal read from b0671921, CS:IP 7c0: 4468
This is how I am assembling it
nasm PRINT.ASM -o out.com
I have tried searching this message in google and found it could be a problem with DOSBox version.
Can anybody let me know what could be the problem here??