l1, libs: replaced "(SET-DOES>)" with more logical "(!DOES>)" (this hints at argument...
[urforth.git] / libs / asmx86 / instrs / simple.f
blobbd74c33c793921d535cbd1466abea84de4136235
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;; UrForth level 1: self-hosting 32-bit Forth compiler
3 ;; Natural-syntax x86 assembler
4 ;; Modelled after SMAL32 built-in assembler
5 ;; Copyright (C) 2020 Ketmar Dark // Invisible Vector
6 ;; GPLv3 ONLY
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;; simple one and two-byte instructions without operands
9 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10 $C9 simple-byte LEAVE
11 $CC simple-byte INT3
12 $CE simple-byte INTO
13 $37 simple-byte AAA
14 $3F simple-byte AAS
15 $99 simple-byte CDQ
16 $98 simple-byte CWDE
17 $F8 simple-byte CLC
18 $FC simple-byte CLD
19 $FA simple-byte CLI
20 $F5 simple-byte CMC
21 $A6 simple-byte CMPSB
22 $A7 simple-byte CMPSD
23 $27 simple-byte DAA
24 $2F simple-byte DAS
25 $F4 simple-byte HLT
26 $6C simple-byte INSB
27 $6D simple-byte INSD
28 $CF simple-byte IRETD
29 $9F simple-byte LAHF
30 $AC simple-byte LODSB
31 $AD simple-byte LODSD
32 $A4 simple-byte MOVSB
33 $A5 simple-byte MOVSD
34 $90 simple-byte NOP
35 $6E simple-byte OUTSB
36 $6F simple-byte OUTSD
37 $61 simple-byte POPAD
38 $60 simple-byte PUSHAD
39 $9D simple-byte POPFD
40 $9C simple-byte PUSHFD
41 \ $C3 simple-byte RET \ moved to RETN
42 \ $CB simple-byte RETF \ defined below
43 $9E simple-byte SAHF
44 $AE simple-byte SCASB
45 $AF simple-byte SCASD
46 $F9 simple-byte STC
47 $FD simple-byte STD
48 $FB simple-byte STI
49 $AA simple-byte STOSB
50 $AB simple-byte STOSD
51 $9B simple-byte WAIT
52 $D7 simple-byte XLAT
53 $D7 simple-byte XLATB
54 $F0 simple-byte LOCK
55 $F3 simple-byte REP
56 $F3 simple-byte REPE
57 $F3 simple-byte REPZ
58 $F2 simple-byte REPNE
59 $F2 simple-byte REPNZ
61 alias CMC CCF ;; complement carry
62 alias STC SCF ;; set carry
64 $66 simple-byte D32
65 $67 simple-byte A32
66 \ Performs an operation equivalent to SBB AL, AL without modifying any flags.
67 \ In other words, AL will be set to FFh or 0 depending on whether CF is set or clear.
68 $D6 simple-byte SETALC
69 alias SETALC SALC
70 $F1 simple-byte ICEBP
72 \ AAM and AAD has hidden operand, let's support it
73 \ $D50A simple-word AAD
74 \ $D40A simple-word AAM
76 $6698 simple-word CBW
77 $6699 simple-word CWD
78 $66A7 simple-word CMPSW
79 $666D simple-word INSW
80 $66CF simple-word IRET
81 $66AD simple-word LODSW
82 $66A5 simple-word MOVSW
83 $666F simple-word OUTSW
84 $6661 simple-word POPAW
85 $6660 simple-word PUSHAW
86 $669D simple-word POPFW
87 $669C simple-word PUSHFW
88 $66AF simple-word SCASW
89 $66AB simple-word STOSW
91 $0F06 simple-word CLTS
92 $0F08 simple-word INVD
93 $0F09 simple-word WBINVD
94 $0F0B simple-word UD2
95 $0F30 simple-word WRMSR
96 $0F31 simple-word RDTSC
97 $0F32 simple-word RDMSR
98 $0F33 simple-word RDPMC
99 $0F34 simple-word SYSENTER
100 $0F35 simple-word SYSEXIT
101 $0FA2 simple-word CPUID
102 $0FAA simple-word RSM
104 $0F77 simple-word EMMS