I used masm 6.11d to compile works fine. Not sure what
the input port is suppose to return........
Result: a looping 232323232323
John
title hello world in asm
;.386
.model small
.stack 100h
.data
.code
main proc
;mov ax,@data
;mov ds,ax
push bp
stosb
l1:
call time_delay ; Here is where I call the delay
routine below.
call time_delay ; I called it three times to see
if I could notice a delay
call time_delay ; a little better. But I see no
difference between one time and three times.
mov dx,14ch ;lo
in al,dx
mov cl,al
mov dx,14dh ;hi
in al,dx
;place 2 and 3 b'cos there are no value from the
input port. No idea what is it.
mov al,2
call near ptr putc ;print
mov al,cl
mov al,3
call near ptr putc
mov ax,120h ;' '
mov dx,0
;int 14h
jmp short l1
; Here is the routine I'm interested in having
evaluated
main endp
putc proc
and al,0fh
or al,30h
mov ah,1
mov dx,0
int 14h
mov ah,0eh
int 10h
ret
putc endp
time_delay proc
mov dx,0ffffh
loop1:
dec dx
cmp dx, 0
jnz loop1
ret
time_delay endp
end main
--- James Newtons Massmind <jamesnewton
KILLspammassmind.org>
wrote:
{Quote hidden}> A PC will do that delay loop so fast that 3 times
> will not show any
> difference from once.
>
> You are pushing bp at the start and not removing it
> before or as part of the
> return.
>
> ---
> James.
>
>
>
> > {Original Message removed}