[cc65] ASM to C help a n00b

From: S M <san.mes1gmail.com>
Date: 2010-05-27 11:56:12
How can I have the following but in C?:

_pCharsLo: .byte <char0
_pCharsHi: .byte >char0

char0:
.byte %11111111
.byte %11101111
.byte %11010111
.byte %10111011
.byte %10101011
.byte %10111011
.byte %11010111
.byte %11111111

_pTileBuffer:
.word tile_buffer01
.word tile_buffer02
.word tile_buffer03
.word tile_buffer04
.word tile_buffer05
.word tile_buffer06
.word tile_buffer07
.word tile_buffer08
.word tile_buffer09
.word tile_buffer010
.word tile_buffer011
.word tile_buffer012


tile_buffer01: .byte 0,0,0,0,0,0,0,0
tile_buffer02: .byte 0,0,0,0,0,0,0,0
tile_buffer03: .byte 0,0,0,0,0,0,0,0
tile_buffer04: .byte 0,0,0,0,0,0,0,0
tile_buffer05: .byte 0,0,0,0,0,0,0,0
tile_buffer06: .byte 0,0,0,0,0,0,0,0
tile_buffer07: .byte 0,0,0,0,0,0,0,0
tile_buffer08: .byte 0,0,0,0,0,0,0,0
tile_buffer09: .byte 0,0,0,0,0,0,0,0
tile_buffer010: .byte 0,0,0,0,0,0,0,0
tile_buffer011: .byte 0,0,0,0,0,0,0,0
tile_buffer012: .byte 0,0,0,0,0,0,0,0



I tried for example:

unsigned char tile_buffer01 [8];
unsigned char tile_buffer02 [8];
unsigned char tile_buffer03 [8];
unsigned char tile_buffer04 [8];
unsigned char tile_buffer05 [8];
unsigned char tile_buffer06 [8];
unsigned char tile_buffer07 [8];
unsigned char tile_buffer08 [8];
unsigned char tile_buffer09 [8];
unsigned char tile_buffer10 [8];
unsigned char tile_buffer11 [8];
unsigned char tile_buffer12 [8];
unsigned char *tile_buffer [] =  {tile_buffer01, tile_buffer02,
tile_buffer03, tile_buffer04, tile_buffer05, tile_buffer06, tile_buffer07,
tile_buffer08, tile_buffer09, tile_buffer10, tile_buffer11, tile_buffer12};

but it didn't work I get teste.c(29) Error: Constant expression expected
teste.c(29): Warning: Converting integer to pointer without a cast
.
.
.

Thank you

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu May 27 11:56:18 2010

This archive was generated by hypermail 2.1.8 : 2010-05-27 11:56:20 CEST