First
right click on the screen addresses below to copy and print them out so
you can refer to them later. A `character` can be printed on the screen using `character` position addresses which are from `0400` to `07E7` hex and the `character` colour position addresses to colour the `character` are from `D800` to `DBE7` hex. Please note from the positions below ,the screen and colour character position addresses from the 2nd to 40th columns the addresses are indicated with the end 2 characters of the address in each square section.Example in row 1 ,column 2 the address is `01` thus the actual address is `0401` and the colour address is `D801`. In the examples below shows the 1st two characters of the screen and colour position addresses. 1st two characters screen address 1st two characters colour address 04 ================================ D8 05 ================================ D9 06 ================================ DA 07 ================================ DB |
SCREEN
AND
COLOUR CHARACTER POSITION ADDRESSES |
![]() |
Here is
how to print a `character` on the screen and colour it:- Enter the `Monitor` and type .A C000 JSR$E544 [clear the screen] .A C003 LDA#$00 [load `A` with the value `00` (code number for colour black)] .A C005 STA$D020 [store the value of `A` into address D020] .A C008 STA$D021 [ " " " " " " " D021] .A C00B LDA#$51 [load `A` with value `51` (ball)] .A C00D STA$05F1 [store the value of `A` into screen address 05F1] .A C010 LDA#$07 [load `A` with value `07`(code number for yellow)] .A C012 STA$D9F1 [store the value of `A` into address D9F1 (colour address for screen address 05F1)] .A C015 JMP$C00B [jump to address C00B to keep the program running] Please do not enter in the `Monitor` after the commands the `brackets [ ]` and the `information`.The information is only there for reference. `D020` address is for to colour the `border`(e.g. `00` black) and `D021` address is to colour the `background` (e.g. `00` black). `51` is the code number for the character `a ball` and the screen character address `05F1` combined with the colour character address `D9F1` is positioned in the `middle` of the screen. Now clear the screen and type .X and press `return` you are now back in `basic`.Type SYS49152 and press `return` to run the program, as you will see in the `middle` of the screen a `yellow ball`. To return to `basic` press `Stop/Restore` same time. |