need help how to inverse

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Aug 2009
Posts: 46
Reputation: jingo1126 is an unknown quantity at this point 
Solved Threads: 0
jingo1126 jingo1126 is offline Offline
Light Poster

need help how to inverse

 
0
  #1
Sep 18th, 2009
ok i can inverse the code
like 1234 to 4321..but when i applied jmp and cmp i dont know what goes wrong with my data..
code without loop
  1. .model small
  2. .stack
  3. .data
  4. .code
  5. start:
  6. mov ah,1
  7. int 21h
  8. push ax
  9.  
  10. mov ah,1
  11. int 21h
  12. push ax
  13.  
  14. mov ah,1
  15. int 21h
  16. push ax
  17.  
  18. pop bx
  19. mov ah,2
  20. mov dl,bl
  21. int 21h
  22.  
  23. pop bx
  24. mov ah,2
  25. mov dl,bl
  26. int 21h
  27.  
  28. pop bx
  29. mov ah,2
  30. mov dl,bl
  31. int 21h
  32. mov ah,4ch
  33. int 21h
here is my code with loop
  1. .model small
  2. .stack
  3. .data
  4. .code
  5. start:
  6. start1:
  7. mov ah,1
  8. int 21h
  9. push ax
  10. cmp al,0ah
  11. je out1
  12. jne start1
  13.  
  14. out1:
  15. pop bx
  16. mov ah,2
  17. mov dl,bl
  18. int 21h
  19. mov ax,4c00h
  20. int 21h
  21. end start
my problem is with my loop how come it wont inverse
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 830
Reputation: wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all 
Solved Threads: 94
wildgoose's Avatar
wildgoose wildgoose is offline Offline
Practically a Posting Shark

Re: need help how to inverse

 
0
  #2
Sep 18th, 2009
You push each key until you get a linefeed 0ah then only pop one value. 0Dh is carriage return!

How many did you push? You need to count them! But using push-pop you're on the right track. Of course this is one method but it will work.
Last edited by wildgoose; Sep 18th, 2009 at 3:40 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 46
Reputation: jingo1126 is an unknown quantity at this point 
Solved Threads: 0
jingo1126 jingo1126 is offline Offline
Light Poster

Re: need help how to inverse

 
0
  #3
Sep 18th, 2009
yea i found the code when i was having a peaceful time at the cafe drkinking my freeze vanilla..thanks for the post wild..
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 134
Reputation: mathematician is an unknown quantity at this point 
Solved Threads: 3
mathematician mathematician is offline Offline
Junior Poster

Re: need help how to inverse

 
0
  #4
Sep 20th, 2009
Deleted
Last edited by mathematician; Sep 20th, 2009 at 10:45 am.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 418 | Replies: 3
Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC