Here is an artical about coding
mov mem/reg, imm.
and the training app with a little addition - test results.
artical in both english and russian version.

(please, see below for updated version)
Posted on 2003-07-08 15:07:52 by The Svin
Hi The Svin


mov al,15h B0 15

defining part is byte B0:
1111 0 000b

Four upper bits (1111) define that it is mov reg,imm


1111 0000b -> F0 =)

should be:
Reg,Imm 1011wrrr


but i know u already know :)
Posted on 2003-07-09 15:53:11 by wizzra
You're right,
should be 1101
I should have checked it before posting. I will soon.
Posted on 2003-07-09 16:58:16 by The Svin
I again can not remove\replace attached file -
here is new one - with the error fixed and new app version - I've made a kb shorter.
Posted on 2003-07-09 17:44:12 by The Svin
Sorry, But can you explain what it mean and what it used for?



lock mov si,fs

Posted on 2003-07-10 06:38:08 by realvampire
There was a little bug - all tabs had the
same text -
fixed
Lock prefix explained in opcode prefix tuts
Posted on 2003-07-10 16:44:32 by The Svin
hi the-svin, and others!

i found a nice article (aside from theSvin's) about opcode decoding and explanations, give it a try.
if there are any bugs/problems please fix it and reUplaod the text.
Posted on 2003-07-11 12:50:26 by wizzra



There are probably some advantages to writing numbers with the LSB first, but then old people would get confused.


Just a thought, that seems to me
relative to the things we discuss.
The only European language I know,
were numbers at least pronanced in
low to upper signifinace order is German.
They say 25 as 5 und 20 not as 20 and 5.
Maybe that's why Germany gave us so many
mathematicians :)
Posted on 2003-07-17 11:43:34 by The Svin
Here is a macro to help write numbers
with separators in any place.
It' s might be usefull to those who need
see parts of number, for example bitfields


sn macro params:VARARG
m$__str TEXTEQU <>
FORC char,<params>
IFNB <char>

m$__str TEXTEQU @CatStr(%m$__str,<char>)

ENDIF

ENDM
EXITM m$__str
endm

Usage.
For example you need to write in binary some opcode
and make it clear about fields.
for example mov ah,09
format 1011 w reg imm.
for mov ah,09
1011
ah = 100
size byte then w = 0
imm = 09h

so it's 1011 100 0 00001001
with macro


db sn(1011 100 0b, 0000 1001b)

it will be equivalent of


db 10111000b,00001001b

other way - you can write with any radix


db sn(1011 100 0b,09h)


the same with mnemonics


mov eax,sn(1234 ABCDh) ;mov eax,1234ABCDh
and edx,sn(1 00 111 000b) ;mask bits 8,5,4,3
etc.


Managed with help of my friend Edmond (Hi-Tech)

db sn(11 101 111b,0Fh,1 2 8, 'what e v e r')
Posted on 2003-08-06 09:40:32 by The Svin