News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Simple GoAsm question

Started by Paul, February 12, 2009, 05:37:06 PM

Previous topic - Next topic

Paul

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

donkey

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
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Paul

Marvelous! Thank you very much.

-Paul

1rDirEctoALgran0

I agree with the first post of Paul.
What is the real meaning of this error message ?
It's very annoying... :eek

Patrick

donkey

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.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable