News:

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

Seems a bit quirky to me? -"Beep"

Started by Artoo, June 22, 2005, 09:52:10 AM

Previous topic - Next topic

Artoo

Could someone please tell me why the follow reports an error:
   error A2071: initializer magnitude too large for specified size
on the line that is commented in the code below?


.586
.model flat, stdcall
option casemap :none

include windows.inc
include kernel32.inc
include user32.inc

includelib kernel32.lib
includelib user32.lib
   
T_Beep       EQU     "Beep"
T_Beeep      EQU     "Beeep"

.data
   
strBeep1     DB     T_Beep,0     ; error A2071: initializer magnitude too large for specified size
strBeep2     DB     T_Beeep,0    ; but no error here!

.code
start:
    mov eax, 0
    invoke ExitProcess,eax
end start

Jeff

T_Beep is being treated as a number rather than text (4 characters == 4 bytes == could be a number).  you could either use the TEXTEQU directive or enclose the text in angle brackets:T_Beep       EQU     <"Beep">
T_Beeep      EQU     <"Beeep">