Assembly x86 - Issue with code -
Assembly x86 - Issue with code -
i'm still quite new assembly. wrote code when seek run in emu8086, programme starts in info segment. set end start
@ end of programme , thought indicate begin reading code.
i looked @ other samples of code seemed same mine. i'm sure simple, doing wrong?
org 100h info segment str db "hello",'$' ; strings printed $ terminating character ends code segment start: mov dx, offset str ; set dx point str phone call printstrline ; phone call print procedure ret ; homecoming scheme ;---------------------------------------; proc printstrline ; ; ; ; prints string terminated $. ; ; ; ; receives: dx = ptr str ; ; ; ;---------------------------------------; force ax ; reg modified, save mov ah, 09h ; function print line int 21h ; interrupt pop ax ; restore reg ret ; homecoming previous location printstrline endp ends end start ; set entry point
after bit of research, i've found using org 100h
not thought if want organize programme segments. defining entry point using end
not create difference. org 100h
files start top.
i'm still not sure why putting jmp start
after org 100h
exit programme rather lead me start:
in code segment
, update if find out.
assembly x86
Comments
Post a Comment