Thursday, September 12, 2019

VIC20-ASM-004 Print Line of Characters on Screen


slot the VICMON cartridge into your VIC20
start VICMON by entering: SYS 24576



We want to accomplish the following:
  1. start program at 1400 and load 0th row coordinate (#$00) into the X register 
  2. load the column coordinate of the left-most screen border (#$00) into the Y register
  3. load $#00 into the accumulator to ensure all bits are turned off (this will make 4 set position instead of get)
  4. call the set cursor location (Plot) subroutine at address $FFF0
  5. load the value for letter W (#$57) into the accumulator
  6. run subroutine ($FFD2) to output the W character (#$57) from the accumulator to screen
  7. compare the value in the Y register with the right-most column coordinate (#$15)
  8. if the comparison was true, then jump to the end of the program (point 11)
  9. otherwise increment the value in the Y register
  10. loop back to load $#00 into the accumulator (point 3)
  11. end the program

test the program from VICMON by entering: .G 1400

the result will be an entire line of W characters from left to right.

congratulations!

No comments:

Post a Comment