Thursday, September 19, 2019

VIC20-ASM-005 Move a Character on Screen (left-to-right)


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


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

test the program from VICMON by entering: .G 1400

the result will be the W characters moving from left to right.

congratulations!

No comments:

Post a Comment