[b]Hi ! If you have time, please take a look at my sample program.
I wrote it below, I'm trying to print the " Hello World " Stateement , It seems that my code is correct but doesn't display any, it's just some kind of a black screen...
Can you evaluate this one?
Just use this code, don't make any programs anymore, just edit it.
And can you please put comments on your modifications? I'm new with assembly, some programming languages I know are , C++ and Java. I couldn't really cope up with Assembly.
This is it.....
CODE
; My code, can't get it, it doesn't display the text
DOSSEG
.MODEL SMALL
.STACK 200H
.DATA
hello db "Hello World"
; I wrote this for clear screen
.CODE
CLRSCR PROC
push ax
mov ah,00h
mov al, 03h
int 10h
pop ax
ret
CLRSCR ENDP
; For printing output
PRINTF PROC
push ax
mov ah, 09h
int 21h
pop ax
ret
PRINTF ENDP
;for takin input
SCANF PROC
push ax
mov ah,0ah
int 21h
pop ax
ret
SCANF ENDP
BEGIN: MOV AX, @DATA
MOV DS, AX
MOV ES, AX
; CLEAR SCREEN
call CLRSCR
; supposed to be this will print " Hello World "
lea dx, hello
call PRINTF
END BEGIN
What do you think about it? Is my logic correct?