Debian Codegraph @

test/supercat.asm

raw
1 ; Pretty horrible bug... :-/ Switching to signed instead
2 ; of unsigned arithmetic made this easier to handle but
3 ; bad use of .ds can still lead to huge files since DASM
4 ; doesn't enforce an upper bound yet. And what should it
5 ; be? Hmm...
6 ;
7 ; From "supercat" on the atariage.com forums, forwarded by
8 ; Andrew Davie 2008/04/12.
9 ;
10 ; Peter H. Froehlich
11 ; phf at acm dot org
12
13 .processor 6502
14
15 .org $7FF8
16 .byte 1,2,3,4,5
17
18 ; original line by "supercat", would produce huge files
19 ; since the "-1" result would be interpreted as a huge
20 ; positive number
21 .ds $7FFC-*
22
23 ; Peter's line made the problem tractable and revealed
24 ; the actual bug, checking this with xxd clearly shows
25 ; the -1 bit pattern 0xffffffff which unsigned is huge.
26 .long $7FFC-*
27
28 .byte 1,2,3,4,5
29
30 .end