I don't understand why I get these errors:
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...
Posted on 2003-02-09 09:34:36 by scientica
Heh, this is where you would write a note in Gunner's MELT tool ;)


[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
Posted on 2003-02-09 09:44:56 by NaN
Well, the file where i include CSS.inc looks like this:

.data

include CSS.inc
include HTML.inc
.data?
.code
Posted on 2003-02-09 09:47:06 by scientica
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:
.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
Posted on 2003-02-09 09:56:30 by 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
Posted on 2003-02-09 09:58:08 by scientica
In an childish attempt to piss ml.exe off I tried to do this:
.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:
Posted on 2003-02-09 10:06:36 by scientica
Got it figured out...


__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
Posted on 2003-02-09 10:14:26 by 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:


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
Posted on 2003-02-09 10:20:01 by NaN
Try placing "assume fs:nothing" just after the start of your code.
Posted on 2003-02-10 08:08:20 by Axial
Sorry, but I don't understant thas fs has to do with my code, I don't use it anywhere (no SEH).
Posted on 2003-02-11 11:57:48 by scientica
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 $.
Posted on 2003-02-11 13:15:07 by tenkey