Friday, September 20, 2019

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


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 right-most screen border (#$15) 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 left-most column coordinate (#$00)
  10. if the comparison was true, then jump to the end of the program (point 13)
  11. otherwise decrement the value in the Y register (DEY)
  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 character moving from right to left.

congratulations!

No comments:

Post a Comment