[cc65] Problem with .define (ca65)

Date view Thread view Subject view

From: Stephan Lesch (slesch_at_studcs.uni-sb.de)
Date: 2002-07-15 21:55:11


Hi,

Can anyone find a mistake in the source below? It should
result in a file with a 1 byte if 'yiff' is defined, and 
a 2 byte otherwise. It works if I define the symbol on the
command line, but not if it's defined in the source.
Are the .define and the .ifdef syntactically correct?


Greets,
Stephan

file test.s:

.define yiff
 
.ifdef yiff
	.byte 1
.else
	.byte 2
.endif


noda_at_linux:~/roy > ca65 -t c64 test.s
test.s(3): Error #24: Identifier expected

After removeing the .define:
noda_at_linux:~/roy > ca65 -t c64 test.s
noda_at_linux:~/roy > ld65 -t c64 -o test test.o
noda_at_linux:~/roy > m test
0000000: 02                                               .

noda_at_linux:~/roy > ca65 -t c64 -D yiff test.s
noda_at_linux:~/roy > ld65 -t c64 -o test test.o
noda_at_linux:~/roy > m test
0000000: 01                                         
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-07-15 21:58:48 CEST