Identify kbd/mouse pos, menu state

This commit is contained in:
Joshua Bell
2018-03-23 19:43:22 -07:00
parent d8de51ac59
commit ee0472f55f
2 changed files with 177 additions and 123 deletions
+22 -1
View File
@@ -66,7 +66,7 @@ cases, e.g. `HideCursor`, `HideCursorImpl`, etc.
* Define local variables (e.g. `ptr := $06`)
* Define offsets, constants, etc.
* Use math where necessary (e.g. `ldy #offset2 - offset1`)
* Use `.sizeof()` (or math if needed) rather than hardcoding sizes
## Structure
@@ -140,3 +140,24 @@ result: .word 0
Currently, only MGTK constants are wrapped in a `.scope` to provide
a namespace. We may want to do that for ProDOS and DeskTop stuff as
well in the future.
## Self-modifying code
* Add a label for the value being modified (byte or address)
```
sta jump_addr
stx jump_addr+1
jump_addr := *+1
jmp $0000
```
```
sty count
ldy #0
: sta table,y
iny
count := *+1
cpy #count
bne :-
```