| ... | ... |
@@ -2,6 +2,14 @@ |
| 2 | 2 |
|
| 3 | 3 |
%RTN { JMP2r }
|
| 4 | 4 |
|
| 5 |
+( devices ) |
|
| 6 |
+ |
|
| 7 |
+|10 @Console [ &pad $8 &char $1 ] |
|
| 8 |
+ |
|
| 9 |
+( variables ) |
|
| 10 |
+ |
|
| 11 |
+|0000 |
|
| 12 |
+ |
|
| 5 | 13 |
( program ) |
| 6 | 14 |
|
| 7 | 15 |
|0100 |
| ... | ... |
@@ -22,6 +30,3 @@ RTN |
| 22 | 30 |
|
| 23 | 31 |
@hello-word [ 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 ] |
| 24 | 32 |
|
| 25 |
-( devices ) |
|
| 26 |
- |
|
| 27 |
-|ff10 @Console [ &pad $8 &char $1 ] |
| ... | ... |
@@ -6,8 +6,17 @@ |
| 6 | 6 |
%=>SC/ADDR { .Screen/addr IOW2 }
|
| 7 | 7 |
%->SC/COLR { .Screen/color IOW }
|
| 8 | 8 |
|
| 9 |
+( devices ) |
|
| 10 |
+ |
|
| 11 |
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
|
| 12 |
+|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ] |
|
| 13 |
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |
|
| 14 |
+|40 @Controller [ &vector $2 &button $1 &key $1 ] |
|
| 15 |
+ |
|
| 9 | 16 |
( variables ) |
| 10 | 17 |
|
| 18 |
+|0000 |
|
| 19 |
+ |
|
| 11 | 20 |
@slime $1 |
| 12 | 21 |
|
| 13 | 22 |
|0100 |
| ... | ... |
@@ -78,9 +87,3 @@ BRK |
| 78 | 87 |
@right_icn [ 3c7e f7f8 f8f7 7e3c ] |
| 79 | 88 |
@slime_icn [ 0000 183c 3c18 0000 ] |
| 80 | 89 |
|
| 81 |
-( devices ) |
|
| 82 |
- |
|
| 83 |
-|ff00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
|
| 84 |
-|ff10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ] |
|
| 85 |
-|ff20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |
|
| 86 |
-|ff40 @Controller [ &vector $2 &button $1 &key $1 ] |
| ... | ... |
@@ -16,6 +16,19 @@ |
| 16 | 16 |
|
| 17 | 17 |
%MEMORY { #1000 }
|
| 18 | 18 |
|
| 19 |
+( devices ) |
|
| 20 |
+ |
|
| 21 |
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
|
| 22 |
+|10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ] |
|
| 23 |
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |
|
| 24 |
+|40 @Controller [ &vector $2 &button $1 &key $1 ] |
|
| 25 |
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ] |
|
| 26 |
+|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ] |
|
| 27 |
+ |
|
| 28 |
+( variables ) |
|
| 29 |
+ |
|
| 30 |
+|0000 |
|
| 31 |
+ |
|
| 19 | 32 |
@loadbtn [ &x $2 &y $2 ] |
| 20 | 33 |
@output [ &x $2 &y $2 ] |
| 21 | 34 |
@pointer [ &x $2 &y $2 ] |
| ... | ... |
@@ -192,11 +205,3 @@ RTN |
| 192 | 205 |
0000 0032 4c00 0000 3c42 99a1 a199 423c |
| 193 | 206 |
] |
| 194 | 207 |
|
| 195 |
-( devices ) |
|
| 196 |
- |
|
| 197 |
-|ff00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
|
| 198 |
-|ff10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ] |
|
| 199 |
-|ff20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ] |
|
| 200 |
-|ff40 @Controller [ &vector $2 &button $1 &key $1 ] |
|
| 201 |
-|ff60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ] |
|
| 202 |
-|ff70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ] |
| ... | ... |
@@ -286,8 +286,6 @@ pass1(FILE *f) |
| 286 | 286 |
while(fscanf(f, "%s", w) == 1) {
|
| 287 | 287 |
if(skipblock(w, &ccmnt, '(', ')')) continue;
|
| 288 | 288 |
if(w[0] == '|') {
|
| 289 |
- if(shex(w + 1) < addr) |
|
| 290 |
- return error("Memory Overwrite", w);
|
|
| 291 | 289 |
addr = shex(w + 1); |
| 292 | 290 |
} else if(w[0] == '%') {
|
| 293 | 291 |
if(!makemacro(w + 1, f)) |
| ... | ... |
@@ -322,6 +320,8 @@ pass2(FILE *f) |
| 322 | 320 |
if(skipblock(w, &ccmnt, '(', ')')) continue;
|
| 323 | 321 |
if(skipblock(w, &ctemplate, '{', '}')) continue;
|
| 324 | 322 |
if(w[0] == '|') {
|
| 323 |
+ if(p.length && shex(w + 1) < p.ptr) |
|
| 324 |
+ return error("Memory Overwrite", w);
|
|
| 325 | 325 |
p.ptr = shex(w + 1); |
| 326 | 326 |
continue; |
| 327 | 327 |
} else if(w[0] == '$') {
|