flat assembler
Message board for the users of flat assembler.

Index > Main > MOV AX,'Me' ; init troubles

Author
Thread Post new topic Reply to topic
Bitdog



Joined: 18 Jan 2004
Posts: 97
Bitdog 23 Feb 2004, 10:01
I can move two characters into AX at the same time with:
MOV AX,'01' ; AX=0x3031
but what if I wanted to move a color & a character

MYcolor =4
MYchar = ':'
MOV AX,'MYcolor,MYchar' ;fails
MOV AX, (MYchar+100h)+MYcolor ;fails

I know there must be a way, since they all are values known to the assembler,
but how to put them together so I don't have to code like this:
MOV AH,MYcolor
MOV AL,MYchar


hlp plz
thankx in advance
Post 23 Feb 2004, 10:01
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 23 Feb 2004, 10:08
what about
Code:
MOV AX, (MYchar shl 8)+MYcolor    
Post 23 Feb 2004, 10:08
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.