943,733 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 1005
  • Assembly RSS
Dec 8th, 2008
0

Re: Let's learn assembly!

Expand Post »
emergent;help i a project in encryption any text of alphapets and numbers into a random characters(from A-Z and 0-9 numbers)
using assembly
if u please
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raseel is offline Offline
10 posts
since Dec 2008
Dec 9th, 2008
0

Re: encryption

Quote ...
encryption any text of alphapets and numbers into a random characters
; do you want later to decrypt it back or no?
Reputation Points: 40
Solved Threads: 4
Junior Poster in Training
low_coder is offline Offline
55 posts
since Nov 2008
Dec 9th, 2008
0

Re: encryption

yes encryption and decryption code
and reading the text from a text file
thanks
Last edited by raseel; Dec 9th, 2008 at 9:53 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raseel is offline Offline
10 posts
since Dec 2008
Dec 9th, 2008
0

Re: encryption

Start simple - write a program which just copies the file, one character at a time.

Until you can do that reliably, there's no point trying to implement a crypt/decrypt, because you'll have no way to test it.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
Dec 9th, 2008
0

Re: encryption

; here is a simple encrypting/decrypting app.:
; on encryption it will just inc hex values represented byeach char
; on decryption dec
Assembly Syntax (Toggle Plain Text)
  1. .386
  2. .model flat,stdcall
  3. option casemap:none
  4. include \masm32\include\windows.inc
  5. include \masm32\include\user32.inc
  6. include \masm32\include\kernel32.inc
  7. include \masm32\include\masm32.inc
  8. includelib \masm32\lib\user32.lib
  9. includelib \masm32\lib\kernel32.lib
  10. includelib \masm32\lib\masm32.lib
  11.  
  12. .data?
  13. szBuff db 256 dup(?)
  14. .code
  15. start:
  16. invoke AllocConsole
  17. invoke StdIn, ADDR szBuff, sizeof szBuff
  18.  
  19. lblCrypt:
  20. mov eax, offset szBuff
  21. @@:
  22. cmp byte ptr [eax],0
  23. je lblPrint
  24. inc byte ptr [eax]
  25. inc eax
  26. jmp @B
  27.  
  28. lblPrint:
  29. mov eax, offset szBuff
  30. invoke StdOut, ADDR szBuff
  31.  
  32. lblDecrypt:
  33. mov eax, offset szBuff
  34. @@:
  35. cmp byte ptr [eax],0
  36. je lblExit
  37. dec byte ptr [eax]
  38. inc eax
  39. jmp @B
  40.  
  41. lblExit:
  42. mov eax, offset szBuff
  43. invoke StdOut, ADDR szBuff
  44. invoke ExitProcess, 0
  45. end start
Reputation Points: 40
Solved Threads: 4
Junior Poster in Training
low_coder is offline Offline
55 posts
since Nov 2008
Dec 10th, 2008
0

Re: encryption

thanks a lot .but it is only allowed for me to use TASM for 8086 ,and u here used MASM ,it is a little bit different could u help me to do this
thanks again
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raseel is offline Offline
10 posts
since Dec 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: Learning Assembly in Linux
Next Thread in Assembly Forum Timeline: long jump in tasm





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC