Test for previous feature.
Cat's Eye Technologies
11 years ago
118 | 118 |
* comments in any spaces; forget the eol thing
|
119 | 119 |
* `outputs` on externals
|
120 | 120 |
* Routine is a kind of StorageLocation? (Location)?
|
121 | |
* remove DELTA -> ADD
|
|
121 |
* remove DELTA -> ADD/SUB (requires carry be notated on ADD and SUB though)
|
122 | 122 |
* Poisoning the highbyte or lowbyte of a word should poison the word
|
97 | 97 |
= update_score ([NamedLocation Nothing "score"])
|
98 | 98 |
= A: UpdatedWith (Immediate 8)
|
99 | 99 |
= NamedLocation (Just Byte) "score": UpdatedWith A
|
|
100 |
|
|
101 |
Routines can name registers as outputs.
|
|
102 |
|
|
103 |
| reserve byte score
|
|
104 |
| routine update_score
|
|
105 |
| {
|
|
106 |
| lda #8
|
|
107 |
| }
|
|
108 |
| routine main {
|
|
109 |
| jsr update_score
|
|
110 |
| sta score
|
|
111 |
| }
|
|
112 |
? routine does not preserve 'A'
|
|
113 |
|
|
114 |
| reserve byte score
|
|
115 |
| routine update_score outputs (.a)
|
|
116 |
| {
|
|
117 |
| lda #8
|
|
118 |
| }
|
|
119 |
| routine main {
|
|
120 |
| jsr update_score
|
|
121 |
| sta score
|
|
122 |
| }
|
|
123 |
= main ([])
|
|
124 |
= A: UpdatedWith (Immediate 8)
|
|
125 |
= NamedLocation (Just Byte) "score": UpdatedWith A
|
|
126 |
=
|
|
127 |
= update_score ([A])
|
|
128 |
= A: UpdatedWith (Immediate 8)
|