routine

All posts tagged routine

Having settled on the use of the win2c64 compiler for now, I wanted to push ahead and continue getting my hands dirty with the 6502/6510 instruction set. I decided to write a simple routine that would clear the screen.

The first step I figured would be to write the basic version. It’s quite a straight forward routine. The default screen memory location starts at $0400 (or 1024 in decimal) and is 1024 bytes long. The first 1000 bytes is allocated for the screen characters (40×25) and these are the bytes I need to modify when clearing the screen.

For this routine, I figured I’d simply populate the screen with spaces to “clear” it. All the routine needs to do is poke the decimal value for space (32) into each screen character location.
Basic clear screen
Continue Reading