Pārlūkot izejas kodu

Document 8086 asm instructions list

Also, remove needless argtype in CALL and RET
master
Virgil Dupras pirms 3 gadiem
vecāks
revīzija
44bcdd4327
7 mainītis faili ar 39 papildinājumiem un 8 dzēšanām
  1. +2
    -2
      blk/033
  2. +1
    -1
      blk/042
  3. +1
    -1
      blk/043
  4. +1
    -1
      blk/450
  5. +1
    -1
      blk/454
  6. +1
    -1
      blk/455
  7. +32
    -1
      doc/asm.txt

+ 2
- 2
blk/033 Parādīt failu

@@ -1,5 +1,5 @@
: OP1 CREATE C, DOES> C@ A, ;
0xc3 OP1 RETn, 0xfa OP1 CLI, 0xfb OP1 STI,
0xc3 OP1 RET, 0xfa OP1 CLI, 0xfb OP1 STI,
0xf4 OP1 HLT, 0xfc OP1 CLD, 0xfd OP1 STD,
0x90 OP1 NOP, 0x98 OP1 CBW,
0xf3 OP1 REPZ, 0xf2 OP1 REPNZ, 0xac OP1 LODSB,
@@ -9,7 +9,7 @@
( no argument, jumps with relative addrs are special )
0xeb OP1 JMPs, 0xe9 OP1 JMPn, 0x74 OP1 JZ,
0x75 OP1 JNZ, 0x72 OP1 JC, 0x73 OP1 JNC,
0xe8 OP1 CALLn,
0xe8 OP1 CALL,

: OP1r CREATE C, DOES> C@ + A, ;
0x40 OP1r INCx, 0x48 OP1r DECx,


+ 1
- 1
blk/042 Parādīt failu

@@ -8,4 +8,4 @@
: RPCn, PC - 2- A,, ;
: AGAIN, ( BREAK?, ) RPCs, ;
( Use RPCx with appropriate JMP/CALL op. Example:
JMPs, 0x42 RPCs, or CALLn, 0x1234 RPCn, )
JMPs, 0x42 RPCs, or CALL, 0x1234 RPCn, )

+ 1
- 1
blk/043 Parādīt failu

@@ -4,4 +4,4 @@
: ;CODE JMPn, 0x1a ( next ) RPCn, ;
VARIABLE lblchkPS
: chkPS, ( sz -- )
CX SWAP 2 * MOVxI, CALLn, lblchkPS @ RPCn, ;
CX SWAP 2 * MOVxI, CALL, lblchkPS @ RPCn, ;

+ 1
- 1
blk/450 Parādīt failu

@@ -1,7 +1,7 @@
lblchkPS BSET ( CX -> expected size )
AX PS_ADDR MOVxI, AX SP SUBxx, 2 SUBAXI, ( CALL adjust )
AX CX CMPxx,
IFNC, ( we're good ) RETn, THEN,
IFNC, ( we're good ) RET, THEN,
( underflow ) DI 0x06 MOVxm, JMPs, lblexec @ RPCs,

PC 3 - ORG @ 1+ ! ( main )


+ 1
- 1
blk/454 Parādīt failu

@@ -11,6 +11,6 @@ CODE OVER ( a b -- a b a ) 2 chkPS,
DI SP MOVxx, AX [DI] 2 MOVx[]+, AX PUSHx, ;CODE
CODE PICK
DI POPx, DI SHLx1, ( x2 )
CX DI MOVxx, CX 2 ADDxi, CALLn, lblchkPS @ RPCn,
CX DI MOVxx, CX 2 ADDxi, CALL, lblchkPS @ RPCn,
DI SP ADDxx, DI [DI] MOVx[], DI PUSHx,
;CODE

+ 1
- 1
blk/455 Parādīt failu

@@ -1,5 +1,5 @@
CODE (roll) ( "2 3 4 5 4 --> 2 4 5 5". See B311 )
CX POPx, CX 2 ADDxi, CALLn, lblchkPS @ RPCn, CX 2 SUBxi,
CX POPx, CX 2 ADDxi, CALL, lblchkPS @ RPCn, CX 2 SUBxi,
SI SP MOVxx, SI CX ADDxx,
DI SI MOVxx, DI 2 ADDxi, STD, REPZ, MOVSB,
;CODE


+ 32
- 1
doc/asm.txt Parādīt failu

@@ -158,7 +158,38 @@ For jumps, it's special. 's' is SHORT, 'n' is NEAR, 'f' is FAR.

# 8086 Instructions list

TODO
r -> AL BL CL DL AH BH CH DX
x -> AX BX CX DX SP BP SI DI
s -> ES CS SS DS
[] -> [SI] [DI] [BP] [BX] [BX+SI] [BX+DI] [BP+SI] [BP+DI]

RET CLI STI HLT CLD STD NOP CBW REPZ REPNZ
LODSB LODSW CMPSB SMPSW MOVSB MOVSW SCASB SCASW STOSB STOSW

CALL J[Z,NZ,C,NC] JMP[s,n,r,f]

INC[r,x,[w],[b],[w]+,[b]+]
DEC[r,x,[w],[b],[w]+,[b]+]
POP[x,[w],[w]+]
PUSH[x,[w],[w]+,s]
MUL[r,x]
DIV[r,x]
XOR[rr,xx]
OR[rr,xx]
AND[rr,xx,ALi,AXI]
ADD[rr,xx,ALi,AXI,xi]
SUB[rr,xx,ALi,AXI,xi]
INT

CMP[rr,xx,r[],x[],r[]+,x[]+]
MOV[rr,xx,r[],x[],[]r,[]x,r[]+,x[]+,[]+r,[]+x,ri,xI,sx,rm,xm
mr,mx]

("1" means "shift by 1", "CL" means "shift by CL")
ROL[r1,x1,rCL,xCL]
ROR[r1,x1,rCL,xCL]
SHL[r1,x1,rCL,xCL]
SHR[r1,x1,rCL,xCL]

# AVR assembler



Notiek ielāde…
Atcelt
Saglabāt