1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2025-01-10 02:29:23 +00:00

Test for previous feature.

This commit is contained in:
Cat's Eye Technologies 2014-04-04 17:14:31 +01:00
parent 240fd49ac3
commit e3c257f4b9
2 changed files with 30 additions and 1 deletions

View File

@ -119,5 +119,5 @@ TODO
* comments in any spaces; forget the eol thing
* `outputs` on externals
* Routine is a kind of StorageLocation? (Location)?
* remove DELTA -> ADD
* remove DELTA -> ADD/SUB (requires carry be notated on ADD and SUB though)
* Poisoning the highbyte or lowbyte of a word should poison the word

View File

@ -98,3 +98,32 @@ modifying score, as an "output" of the routine.
= update_score ([NamedLocation Nothing "score"])
= A: UpdatedWith (Immediate 8)
= NamedLocation (Just Byte) "score": UpdatedWith A
Routines can name registers as outputs.
| reserve byte score
| routine update_score
| {
| lda #8
| }
| routine main {
| jsr update_score
| sta score
| }
? routine does not preserve 'A'
| reserve byte score
| routine update_score outputs (.a)
| {
| lda #8
| }
| routine main {
| jsr update_score
| sta score
| }
= main ([])
= A: UpdatedWith (Immediate 8)
= NamedLocation (Just Byte) "score": UpdatedWith A
=
= update_score ([A])
= A: UpdatedWith (Immediate 8)