1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-03-25 21:30:44 +00:00

Trying for more initialization fixes

This commit is contained in:
David Schmenk 2014-11-23 10:59:55 -08:00
parent f60b0fb43a
commit 1efd12b15c

View File

@ -217,6 +217,7 @@ const WPTR_TYPE = $40
const PTR_TYPE = $60 // (BPTR_TYPE | WPTR_TYPE)
const XBYTE_TYPE = $22 // (BPTR_TYPE | BYTE_TYPE)
const XWORD_TYPE = $44 // (WPTR_TYPE | WORD_TYPE)
const XADDR_TYPE = $6E
const STR_TYPE = $80
//
// Keywords
@ -2109,7 +2110,7 @@ def emit_data(vartype, consttype, constval, constsize)
emit_byte(constval)
else
size = 2
if consttype & ADDR_TYPE
if consttype & XADDR_TYPE
emit_addr(constval)
else
emit_word(constval)
@ -2911,7 +2912,7 @@ def parse_constval(valptr, sizeptr)
idptr = id_lookup(tknptr, tknlen)
if !idptr; return parse_err(@bad_cnst); fin
type = idptr->idtype
if type & ADDR_TYPE
if type & XADDR_TYPE
if !(mod & 8); return parse_err(@bad_cnst); fin
fin
*valptr = idptr=>idval