home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / CTFASMTT.ZIP / EXAMPLES.DOC < prev    next >
Encoding:
Text File  |  1994-10-29  |  1.0 KB  |  40 lines

  1. EXAMPLES FILE
  2.  
  3. all of the examples are not in complete program you will have to put
  4. the in one !!!
  5.  
  6. lesson 2 :
  7.  
  8. mov : "mov ax,2" ax will be ax.
  9. add : "add ax,2" ax will be ax+2.
  10. sub : "sub ax,2" ax will be ax-2.
  11. inc : "inc ax"   ax will be ax+1.
  12. dec : "dec ax"   ax will be ax-1.
  13. and : "and ax,1" ax will be anded with 1. (if ax=0 then ax*1 is 0)
  14. or  : "or ax,1"  ax will be ored with 1.  (if ax=0 then ax+1 is 1)
  15.  
  16. lesson 3 :
  17.  
  18. mov ax,4c00h
  19. int 21h      ; terminate
  20.  
  21. mov ax,seg msg
  22. mov ds,ax
  23. mov dx,offset msg
  24. mov ah,9
  25.  
  26. int 21h     ; writes a message
  27.  
  28. lesson 4 :
  29.  
  30. shr : "shr ax,1" ax will be ax/2 (2^1).
  31. shl : "shl ax,1" ax will be ax*2 (2^1).
  32. ror : "ror ax,1" ax will be rotated right by one bit.
  33. rol : "rol ax,1" ax will be rotated left by one bit.
  34. div : "div cx"   ax will be divided by cx.
  35. mul : "mul cx"   ax will be multiplied by cx.
  36. neg : "neg ax"   ax will be ax*-1.
  37.  
  38. these were basic examples for the starting lessons, the next lessons have
  39. their own examples so.........
  40. "lucretia" said....