I don't understand why I get these errors:
When I don't use any register in that file (it's just an data include file)
Damn, I hit the post button to soon...
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
ml /c /coff /nologo SERVER.asm
Assembling: SERVER.asm
Browser\CSS.inc(7) : error A2108: use of register assumed to ERROR
Browser\CSS.inc(32) : error A2108: use of register assumed to ERROR
When I don't use any register in that file (it's just an data include file)
__CSS_szFileName db 'types.css',0
__CSS_dwFileSize dd ( ((offset __CSS_EOF)-(offset __CSS_SOF)) and 0FFFFFFFFh)
LF equ 0Ah ; UNIX style line feed
__CSS_SOF: ; Line # 7
__CSS_FileData equ (offset __CSS_SOF)
...
__CSS_EOF: ; Line #32
Damn, I hit the post button to soon...
Heh, this is where you would write a note in Gunner's MELT tool ;)
If i remember correctly, this is the standard message when the assembler still has
its in head the code segment, and you start adding more data segment definitions
without telling it such ;)
Lemme know if im right, I fell 90% certian tho..
:alright:
NaN
[color=red].data[/color]
__CSS_szFileName db 'types.css',0
__CSS_dwFileSize dd ( ((offset __CSS_EOF)-(offset __CSS_SOF)) and 0FFFFFFFFh)
LF equ 0Ah ; UNIX style line feed
__CSS_SOF: ; Line # 7
__CSS_FileData equ (offset __CSS_SOF)
...
__CSS_EOF: ; Line #32
If i remember correctly, this is the standard message when the assembler still has
its in head the code segment, and you start adding more data segment definitions
without telling it such ;)
Lemme know if im right, I fell 90% certian tho..
:alright:
NaN
Well, the file where i include CSS.inc looks like this:
.data
include CSS.inc
include HTML.inc
.data?
.code
I just cut and pasted the above include file and put it in my data section include area (on some software im currently writting) and it compiled as soon as i took out the ("...") from the posting ;)
My other guess is your assembly declarations.. do you have:
?
Cause this is all that preceeds your include in my compile.. (which like i said, worked on the first try).
:alright:
NaN
My other guess is your assembly declarations.. do you have:
.386
.model flat,stdcall
option casemap:none
?
Cause this is all that preceeds your include in my compile.. (which like i said, worked on the first try).
:alright:
NaN
My first lines in the file assemble the project with looks like this, can it be the option scoped that messes things up?
.386
.model flat,stdcall
option casemap:none
OPTION SCOPED
In an childish attempt to piss ml.exe off I tried to do this:
And WTF I compiles without error now, I don't get it... :confused: :confused: :confused: :confused:
.data
.code
; This is the Style Sheet data file.
__CSS_szFileName db 'types.css',0
__CSS_dwFileSize dd ( ((offset __CSS_EOF)-(offset __CSS_SOF)) and 0FFFFFFFFh)
LF equ 0Ah ; UNIX style line feed
__CSS_SOF:
__CSS_FileData equ (offset __CSS_SOF)
__CSS_FileData_LinkStyle db "A:visited { text-decoration:none; }", LF
...
And WTF I compiles without error now, I don't get it... :confused: :confused: :confused: :confused:
Got it figured out...
:alright:
NaN
__CSS_szFileName db 'types.css',0
__CSS_dwFileSize dd ( ((offset __CSS_EOF)-(offset __CSS_SOF)) and 0FFFFFFFFh)
LF equ 0Ah ; UNIX style line feed
__CSS_SOF [color=red]LABEL BYTE[/color]
__CSS_FileData equ (offset __CSS_SOF)
__CSS_EOF [color=red]LABEL BYTE[/color]
:alright:
NaN
Should have seen this earlier ( :rolleyes: ). In the same file i used to test your inlcude, i have a simular file for global definitions:
And in the startup code:
Anywho.. there you go...
:alright:
NaN
Global_Begin LABEL BYTE
;---------------------------------------------------------------------------------------------
;Window Specific Globals
hWindow dd ?
hInstance dd ?
hIcon dd ?
hCursor dd ?
hMenu dd ?
;Excel Globals
pIExcelApp dd ?
pIAcad dd ?
;---------------------------------------------------------------------------------------------
Global_End LABEL BYTE
And in the startup code:
.code
start:
;NULL all Global Variables
lea eax, Global_Begin
lea edx, Global_End
sub edx, eax
invoke RtlZeroMemory, eax, edx
Anywho.. there you go...
:alright:
NaN
Try placing "assume fs:nothing" just after the start of your code.
Sorry, but I don't understant thas fs has to do with my code, I don't use it anywhere (no SEH).
Well, if using LABEL BYTE cures the problem, the register in question is the CS register. I ran into this with TASM in MASM compatibility mode. A label defined with ':' needs CS assumed to the current segment. (The assembler will try to define the offset of the label using the current CS assumption.)
So when you switch to the .data segment, either 1) you add ASSUME CS:_DATA and reassume to _TEXT when you switch back to .code, or 2) you define the label some other way: LABEL <type> or EQU $.
So when you switch to the .data segment, either 1) you add ASSUME CS:_DATA and reassume to _TEXT when you switch back to .code, or 2) you define the label some other way: LABEL <type> or EQU $.