mirror of
https://github.com/catseye/SixtyPical.git
synced 2026-04-23 21:17:54 +00:00
Merge branch 'develop-0.18' of https://github.com/catseye/SixtyPical into goto-at-end-of-block
This commit is contained in:
@@ -1118,6 +1118,52 @@ Some rudimentary tests for `cmp`.
|
||||
| }
|
||||
? UnmeaningfulReadError: a
|
||||
|
||||
`cmp` can work on words. In this case, it trashes `a`.
|
||||
|
||||
| word za
|
||||
| word zb
|
||||
|
|
||||
| define main routine
|
||||
| inputs za, zb
|
||||
| trashes a, z, c, n
|
||||
| {
|
||||
| cmp za, zb
|
||||
| }
|
||||
= ok
|
||||
|
||||
| word za
|
||||
| word zb
|
||||
|
|
||||
| define main routine
|
||||
| inputs za, zb
|
||||
| trashes a, z, n
|
||||
| {
|
||||
| cmp za, zb
|
||||
| }
|
||||
? ForbiddenWriteError: c
|
||||
|
||||
| word za
|
||||
| word zb
|
||||
|
|
||||
| define main routine
|
||||
| inputs za, zb
|
||||
| trashes z, c, n
|
||||
| {
|
||||
| cmp za, zb
|
||||
| }
|
||||
? ForbiddenWriteError: a
|
||||
|
||||
| word za
|
||||
| word zb
|
||||
|
|
||||
| define main routine
|
||||
| inputs za
|
||||
| trashes z, c, n
|
||||
| {
|
||||
| cmp za, zb
|
||||
| }
|
||||
? UnmeaningfulReadError: zb
|
||||
|
||||
### and ###
|
||||
|
||||
Some rudimentary tests for `and`.
|
||||
|
||||
@@ -385,6 +385,26 @@ Some instructions on tables. (3/3)
|
||||
= $081B DEC $081F,X
|
||||
= $081E RTS
|
||||
|
||||
Compiling 16-bit `cmp`.
|
||||
|
||||
| word za @ 60001
|
||||
| word zb : 3003
|
||||
|
|
||||
| define main routine
|
||||
| inputs za, zb
|
||||
| trashes a, z, c, n
|
||||
| {
|
||||
| cmp za, zb
|
||||
| }
|
||||
= $080D LDA $EA61
|
||||
= $0810 CMP $081C
|
||||
= $0813 BNE $081B
|
||||
= $0815 LDA $EA62
|
||||
= $0818 CMP $081D
|
||||
= $081B RTS
|
||||
= $081C .byte $BB
|
||||
= $081D .byte $0B
|
||||
|
||||
Compiling `if`.
|
||||
|
||||
| define main routine
|
||||
|
||||
Reference in New Issue
Block a user