Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing immediate value byte assigment in TASM 5.0

Status
Not open for further replies.

FinalBirdman

Programmer
Sep 21, 2002
9
0
0
US
I am using tasm 5.0, and I noticed an annoying occurence. Immediate values are assumed to be words. So when I write an immediate value to memory that is a byte value, it writes over the next byte in memory with a zero! Took me a while to figure out what the heck was going wrong with the code there!

Is it possible to change the default number of bytes allocated to an immediate value? Other wise, I have to mov the immediate to AL, and then to memory to avoid the problem. It works, but its two instructions for one.

Any help is appreciated.
 
If you're doing something like
mov es:[di], 037h
try something along the lines of
mov byte ptr es:[di], 037h
I can't remember the syntax exactly offhand, but something along those lines should do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top