:confused: Hi, sorry for the stupid question, but I've only just really started learning.
Having read most of Randal Hydes HLA book, I started on Iczelion's tutorials. Please can someone explain what the 'db' means in the context of the following...
ClassName db "SimpleWinClass",0
AppName db "Our First Window",0
? Also, what does dd mean in a similar context?
Sorry to waste your time,
Thank you,
Posted on 2001-11-14 17:05:57 by adamjjackson

It is just an abreviated notation for DWORD.

Abrv datasize hex
~~~~ ~~~~~~~~ ~~~
DB = BYTE 00
DW = WORD 00 00
DD = DWORD 00 00 00 00

This is standard assembler notation.


Posted on 2001-11-14 17:25:20 by hutch--
db --> define byte
dw --> define word
dd --> define double

I suppose you could also use


like that...
Posted on 2001-11-14 17:25:39 by lackluster
dd are for declaring numbers, or 4 byte stuff
db is for declaring characters,or 1 byte stuff
Posted on 2001-11-14 17:47:21 by andy981
Let me confuse things:
REAL4 - 4 bytes of floating point data
REAL8 - 8 bytes of floating point data
REAL10 - 10 bytes of floating point data
TBYTE - same as REAL10 (Ten BYTE?)
QWORD - 4 words, or 8 bytes used for MMX,K3D
OWORD or XWORD? - 8 words, 16 bytes used for XMM

MASM also has support for signed numbers, but I never use it. I've never used the XMM stuff. There is also a FAR pointer type used for 16-bit stuff - it's six bytes.
Posted on 2001-11-14 18:07:26 by bitRAKE
Windows will let you use dw strings (aka UniCode). All you really are doing is setting aside a spot in ram, that will be filled with the value when Windows loads your app. And the variable name is just a ptr (or an integration of a ptr) to that spot in ram.
Posted on 2001-11-15 05:56:42 by eet_1024
Thanks a lot, some of that went over my head but I get it.
Posted on 2001-11-15 06:13:25 by adamjjackson

There is also a FAR pointer type used for 16-bit stuff - it's six bytes.

A bit wrong :). A FAR pointer in 16bit is 4 bytes. SEG:OFS. However,
a FAR pointer in 32bit is 6 bytes... SEL:OFS (notice the subtle difference
between SEG and SEL). Luckily when working with a flat address
space like win32, you don't have to mess with FAR pointers. They
are quite messy in 32bit mode, you have to allocate descriptors
and whatnot =).
Posted on 2001-11-15 06:27:23 by f0dder