Hello World in VAX-11 MACRO

posted on 2009-09-15 18:01:44+08:00 by david
VAX-11-Macro
  1. ; Hello World in VAX-11 MACRO
  2.  
  3. .title hello
  4. term_name: .ascid /SYS$INPUT/
  5. term_chan: .blkw 1
  6. out_iosb: .blkq 1
  7. msg: .asciz /Hello, world!/
  8.  
  9. .entry start,0
  10.  
  11. ; establish a channel for terminal I/O
  12. $assign_s devnam=term_name,-
  13. chan=term_chan
  14. blbc r0,error
  15.  
  16. ; queue the I/O request
  17. $qio_s chan=term_chan,-
  18. func=#io$_writevblk,-
  19. iosb=out_iosb,-
  20. p1=msg,-
  21. p2=#13
  22. blbc r0,error
  23.  
  24. $exit_s ; normal exit
  25.  
  26. error: halt ; error condition
  27.  
  28. .end start

All Code Snippets

Hot Code Snippets

New Code Snippets