Hey Guys, I haven't been on for a while but Im translating a program from MASM to NASM and I need to know what a few things mean:
1)The following looks like some array indexing or something.
OffNum DW 0000, 0000 ; declared in beginning of file, no problem
.
.
later in code
.
.
MOV OffNum[1], AX ; what is the [1]?
2)"WhatEver PROC USES AX BX CX"
Does that push those registers automatically or just tell the assembler what to be prepared for?
Thanks a ton for your help!
jon
Hello!
My short answers:
1. mov Offnum[1],ax = mov [Offnum+1],ax
2. USES will be compiled into push instructions, and into pop instructions at the end
Greets, Gábor
Excellent! Thank you! I assumed the situation with "USES" since none of the procedures had initial PUSH instructions to preserve registers incoming. Thanks again!
Hey all,
Here's another one. What does this one mean?
Whatever EQU THIS BYTE
Perhaps a help file is needed ?
http://webster.cs.ucr.edu/AsmTools/MASM/index.html
(http://webster.cs.ucr.edu/AsmTools/MASM/index.html%3Cbr%20/%3E)
I didn't find it in the MASM doc. What else ya got?
In the masm reference guide,\masm32\HELP\MASM32.HLP
choose index,THIS
Quote
Syntax: THIS qualifiedtype
Description:
Returns an operand of <qualifiedtype> with offset and segment
values equal to the current location-counter value. THIS can be
used with EQU or = to create labels and variables. THIS NEAR is
equivalent to $.
These two lines are equivalent:
tag1 EQU THIS BYTE
tag1 LABEL BYTE
The <qualifiedtype> can be any qualified type.