The MASM Forum Archive 2004 to 2012

Project Support Forums => GoAsm Assembler and Tools => Topic started by: Paul on February 12, 2009, 05:37:06 PM

Title: Simple GoAsm question
Post by: Paul on February 12, 2009, 05:37:06 PM
Hi All,

Why can't I define a byte whose leftmost bit (sign bit) is one? E.g., defining

   DB A9h

gives GoAsm error:

Data declaration too small assuming it should hold at least a 32-bit address:- DB A9h

I think I know what's going on here. But it's awkward not being able to define individual bytes of any value.

Thanks.

Cordially,

Paul
Title: Re: Simple GoAsm question
Post by: donkey on February 12, 2009, 05:57:15 PM
If you are using HEX, it must always start with a digit from 0..9 so it would be

DB 0A9h

you can also use the alternate syntax

DB 0xA9

This is to differentiate numbers from labels (which cannot start with digits 0..9)

Edgar
Title: Re: Simple GoAsm question
Post by: Paul on February 13, 2009, 04:23:53 PM
Marvelous! Thank you very much.

-Paul
Title: Re: Simple GoAsm question
Post by: 1rDirEctoALgran0 on February 15, 2009, 08:21:17 PM
I agree with the first post of Paul.
What is the real meaning of this error message ?
It's very annoying... :eek

Patrick
Title: Re: Simple GoAsm question
Post by: donkey on February 15, 2009, 10:34:30 PM
Quote from: 1rDirEctoALgran0 on February 15, 2009, 08:21:17 PM
I agree with the first post of Paul.
What is the real meaning of this error message ?
It's very annoying... :eek

Patrick


The error message makes perfect sense, since A9h has to be a label because it starts with a letter, GoAsm assumes it is a 32 bit address which will not fit in a byte. Remember that goasm allows a label to be used in the data section without OFFSET:

hInstance DD ?
phInstance DD hInstance

would move the 32 bit pointer to hInstance into phInstance.