home *** CD-ROM | disk | FTP | other *** search
/ Chip: Shareware for Win 95 / Chip-Shareware-Win95.bin / ostatni / sms32 / call.asm < prev    next >
Encoding:
Assembly Source File  |  1997-03-15  |  2.0 KB  |  78 lines

  1. ; RATHER A LOT OF PROCEDURE CALLING HERE.
  2. ; THERE IS NO RECURSION.
  3. ; RECURSION IS POSSIBLE.
  4.  
  5. ; ----- THE MAIN PROGRAM ---------------------------------------
  6.  
  7. rep:
  8.     call    30    ; Call the procedures at these addresses
  9.     call    40
  10.     call    50
  11.     call    60
  12.     call    70
  13.     call    80
  14.     call    90
  15.     jmp    rep    ; Jump back to the start
  16.  
  17. ; ----- A PROCEDURE --------------------------------------------
  18.     org    30    ; Origin or start address of procedure
  19.     call    40    ; Call the procedures at these addresses
  20.     call    50
  21.     call    60
  22.     call    70
  23.     call    80
  24.     call    90
  25.     ret        ; Return to address saved on stack
  26.  
  27. ; ----- A PROCEDURE --------------------------------------------
  28.     org    40    ; Origin or start address of procedure
  29.     call    50    ; Call the procedures at these addresses
  30.     call    60
  31.     call    70
  32.     call    80
  33.     call    90
  34.     ret        ; Return to address saved on stack
  35.  
  36. ; ----- A PROCEDURE --------------------------------------------
  37.     org    50    ; Origin or start address of procedure
  38.     call    60    ; Call the procedures at these addresses
  39.     call    70
  40.     call    80
  41.     call    90
  42.     ret        ; Return to address saved on stack
  43.  
  44. ; ----- A PROCEDURE --------------------------------------------
  45.     org    60    ; Origin or start address of procedure
  46.     call    70    ; Call the procedures at these addresses
  47.     call    80
  48.     call    90
  49.     ret        ; Return to address saved on stack
  50.  
  51. ; ----- A PROCEDURE --------------------------------------------
  52.     org    70    ; Origin or start address of procedure
  53.     call    80    ; Call the procedures at these addresses
  54.     call    90
  55.     ret        ; Return to address saved on stack
  56.  
  57. ; ----- A PROCEDURE --------------------------------------------
  58.     org    80    ; Origin or start address of procedure
  59.     call    90    ; Call the procedures at these addresses
  60.     ret        ; Return to address saved on stack
  61.  
  62. ; ----- A PROCEDURE --------------------------------------------
  63.     org    90    ; Origin or start address of procedure
  64.     nop        ; Do Nothing for one clock cycle
  65.     pop    al
  66.     push    al
  67.     pop    bl
  68.     push    bl
  69.     pop    cl
  70.     push    cl
  71.     pop    dl
  72.     push    dl    
  73.     nop
  74.     ret        ; Return to address saved on stack
  75.  
  76.     end
  77. ; --------------------------------------------------------------
  78.