home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / discs / shareware / share_46 / sasm / Examples / Hello_B < prev    next >
Text File  |  1993-03-20  |  1KB  |  41 lines

  1. ;--> Hello_B
  2.  
  3. ; Second file of demo program for SAsm
  4. ; ⌐ D.J.Holden 1991
  5.  
  6. ; This code will only be assembled if the SHIFT key 
  7. ; is held down during assembly
  8.  
  9. # IF shift%=TRUE THEN
  10.  
  11.         adrl r2,shift_message           ; Make r2 point to the message
  12.  
  13.         FNmessage (r2)                   ; Display message pointed to by r2
  14.  
  15. # ENDIF
  16.  
  17. ; End of conditional assembly section
  18.  
  19.         mov r0,#0
  20.         swi "OS_Exit"                   ; All done so quit
  21.  
  22. ; These messages are defined using the mnemonic db
  23. ; This enables control codes to be inserted into a
  24. ; string without lots of 'equbs' or '+CHRS$s'
  25.  
  26. .welcome  db  "Welcome to the SAsm Assembler",13,10
  27.           db  "This is the 'Hello' demonstration program."
  28.           db  13,10,10,0
  29.  
  30. .shift_message
  31.           db  7,"When you assembled this program",13,10
  32.           db  "the SHIFT key was held down.",13,10,10,0
  33.  
  34. # END                                   ; Finished writing code
  35.  
  36.  
  37.   ;------------------------------------------------------------
  38.   ; Everything below here won't be assembled but will be passed
  39.   ; straight to Basic so should only be Macro definitions
  40.   ;------------------------------------------------------------
  41.