Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 22nd, 2005, 2:29 AM   #1
calvin0176
Newbie
 
Join Date: Mar 2005
Posts: 2
Rep Power: 0 calvin0176 is on a distinguished road
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.
calvin0176 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:50 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC