home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / books / 68k_book / arp_src / prg_6ir.s < prev    next >
Text File  |  1985-11-20  |  1KB  |  50 lines

  1.  ; Program Name: PRG_6IR.S
  2.  ;      Version: 1.001
  3.  
  4.  ; Function:
  5.  
  6.  ;    Illustrate the manner in which numbers are placed in the stack.
  7.  
  8.  ; Assembly Instruction:
  9.  
  10.  ;    Assemble in Relocatable mode, go to the debugger and click on the
  11.  ; relocate button.
  12.  
  13.  ; Execution Instructions:
  14.  
  15.  ;    In the debugger, use the Single step button to execute only the
  16.  ; instructions which load a stack address into register A7 and those which
  17.  ; store values into the stack.  Move the PC cursor manually to jump over
  18.  ; the stack space declarations.
  19.  
  20.  text
  21. push_word_1:
  22.  lea       stack_1, sp
  23.  move.w    #5, -(sp)
  24.            ds.l  1
  25. stack_1:   ds.l  0
  26.  
  27.  text
  28. push_longword_1:
  29.  lea       stack_2, sp
  30.  move.l    #5, -(sp)
  31.            ds.l  2
  32. stack_2:   ds.l  0
  33.  
  34.  text
  35. push_word_2:
  36.  lea       stack_3, sp
  37.  move.w    #1770, -(sp)
  38.            ds.l  1
  39. stack_3:   ds.l  0
  40.  
  41.  text
  42. push_longword_2:
  43.  lea       stack_4, sp
  44.  move.l    #1234567890, -(sp)
  45.            ds.l  2
  46. stack_4:   ds.l  0
  47.  end
  48.  
  49.