|
Newbie
Join Date: Mar 2005
Posts: 2
Rep Power: 0 
|
Nasm Help!!!!!!
hello.. i have this problem.. i made a program that will ask the user for inputs, and every keystroke is stored in a buffer "variable"
here is my code..
---------------------------------
call cleardisp
mov AH,0x09
lea DX,[msg8]
int 0x21
mov DX,temp1
mov AH,0x0A
int 0x21
mov AH,0x09
lea DX,[msg9]
int 0x21
mov DX,temp2
mov AH,0x0A
int 0x21
mov AH,0x09
lea DX,[msg10]
int 0x21
lea DX,[temp1] <--- i have a problem with displayin its contents, since
int 0x21 this is not terminated by a '$'
lea DX,[msg11]
int 0x21
mov DX,[temp2] <---- same as this
int 0x21
lea DX,[msg100]
int 0x21 ----------------------------------------
temp1 resb 7 <----------I
temp2 resb 7 <----------I------- i needed these to store 4 bytes of data
temp3 resb 7 <----------I ----------------------------------------
this part is supposed to swap the data stored between temp1 and temp2 by using a buffer temp3. i had the ';' since im having trouble with the code above.
;swap:
; mov AX,temp1
; mov DS,AX
; mov AX,temp3
; mov ES,AX
; mov SI,[temp1]
; mov DI,[temp3]
; cld
; mov CX,0x0A
; rep movsb
; mov AX,temp2
; mov DS,AX
; mov AX,temp1
; mov ES,AX
; mov SI,[temp2]
; mov DI,[temp1]
; cld
; mov CX,0x0A
; rep movsb
; mov AX,temp3
; mov DS,AX
; mov AX,temp2
; mov ES,AX
; mov SI,[temp3]
; mov DI,[temp2]
; cld
; mov CX,0x0A
; rep movsb
int 0x20
jmp selopt
Last edited by calvin0176; Mar 22nd, 2005 at 2:38 AM.
|