why are you using this?
n2:
pop ax
mov bx,ax
push bx
loop n2
That instructions maintain the stack status intact, since you pop a value out, and push it back immediately onto the stack (doing that operation 6 times).
I suggest you to store the key pressed in a variable, for example, declare:
keys db 6 dup(?)
Jaime
-----Mensaje original-----
De: bena [mailto:[EMAIL PROTECTED]
Enviado el: Martes, 26 de Octubre de 2004 15:37
Para: [EMAIL PROTECTED]
Asunto: [c-prog] plz help for assmebly
i have this assembly programe
that read a name from the user and print it in same order
qustion asked to use stack and int 16
i don't know why not it print it in the same order i do it write
it print in interrupt 21h but in interrupt 16 not working write can
some body tells me why
her is the code
.model small
.stack 100h
.code
mov cx,6
name1: mov ah,00h
int 16h
push ax
loop name1
mov cx,6
n2:
pop ax
mov bx,ax
push bx
loop n2
mov cx, 6
n3: pop bx
mov ah,02h
mov dx,bx
int 21h
loop n3
end
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Yahoo! Groups Links
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
