home *** CD-ROM | disk | FTP | other *** search
/ Nibble Magazine / nib24b.dsk / SAMPLE.txt < prev    next >
Text File  |  2023-02-26  |  908b  |  34 lines

  1. "         ORG $300"
  2. "*"
  3. "* SAMPLE PROGRAM TO SHOW OFF THE FEATURES OF BASIC ASSEMBLER MODIFICATIONS"
  4. "* BY ALBERT C. BAKER, JR."
  5. "*"
  6. "COUT     EQU $FDED           CHARACTER OUT MONITOR ROUTINE"
  7. "CROUT    EQU $FC62           PRINT CARRIAGE RETURN MONITOR SUBROUTINE"
  8. "N        EQU $6"
  9. "BELL     EQU 7               ASCII BELL CHARACTER"
  10. "RTNTOBAS EQU $3D0"
  11. "         JSR CROUT           PRINT <RETURN>"
  12. "*"
  13. "         LDX #0              PRINT OUT TEXT OF MESSAGE"
  14. "LOOP     LDA MESSAGE,X"
  15. "         JSR COUT"
  16. "         INX"
  17. "         CPX #18             HAVE WE PRINTED WHOLE MESSAGE?"
  18. "         BNE LOOP"
  19. "         JSR CROUT"
  20. "         JMP RTNTOBAS"
  21. "*"
  22. "* VARIOUS EXAMPLE INSTRUCTIONS"
  23. "*"
  24. "DATA     HEX $8D00"
  25. "         LDA N+1"
  26. "         STA N-1"
  27. "         LDA <MESSAGE"
  28. "         LDY >MESSAGE"
  29. "         LDA #BELL"
  30. "         JSR COUT"
  31. "MESSAGE  ASC 'HI THERE, '"
  32. "         ASC 'NIBBLER.'"
  33. "         EOF"
  34.