| 1 |
; Test negative literals. |
| 2 |
; |
| 3 |
; This came about because of the "-1 bug" in 2.20.10 and |
| 4 |
; will hopefully ensure that no such bug ever returns to |
| 5 |
; haunt us again... |
| 6 |
; |
| 7 |
; Peter H. Froehlich |
| 8 |
; phf at acm dot org |
| 9 |
|
| 10 |
.processor 6502 |
| 11 |
.org 0 |
| 12 |
|
| 13 |
lda #0 |
| 14 |
; lda #+0 ;syntax error? needs a FIX as well :-) |
| 15 |
lda #-0 |
| 16 |
|
| 17 |
lda #1 |
| 18 |
lda #-1 |
| 19 |
|
| 20 |
lda #127 |
| 21 |
lda #128 |
| 22 |
lda #129 |
| 23 |
|
| 24 |
lda #-127 |
| 25 |
lda #-128 |
| 26 |
lda #-129 |
| 27 |
|
| 28 |
lda #254 |
| 29 |
lda #255 |
| 30 |
lda #256 ; should fail? does fail! |
| 31 |
|
| 32 |
lda #-254 |
| 33 |
lda #-255 |
| 34 |
lda #-256 ; should fail? does NOT yet fail? |
| 35 |
|
| 36 |
lda #1024 ; should fail? does fail! |
| 37 |
lda #-1024 ; should fail? does NOT yet fail? |
| 38 |
|
| 39 |
.end |