class Wilson::Assembler
Assembler parses the NASM documentation and creates Command objects for it
Attributes
commands[RW]
Public Class Methods
nasm()
click to toggle source
# File lib/wilson.rb, line 74 def self.nasm FileFile.read(
nasm_fixes()
click to toggle source
# File lib/wilson.rb, line 42 def self.nasm_fixes # TODO: extend parser to split /[,:]/ and remove some of these ' CALL imm,imm16 ; o16 9A iw iw [8086] CALL imm,imm32 ; o32 9A id iw [386] CALLFAR mem16 ; o16 FF /3 [8086] CALLFAR mem32 ; o32 FF /3 [386] Jcc imm ; 0F 80+cc rw/rd [386] JMP imm,imm16 ; o16 EA iw iw [8086] JMP imm,imm32 ; o32 EA id iw [386] JMP imm16 ; E9 rw/rd [8086] JMP imm32 ; E9 rw/rd [8086] JMP imm8 ; EB rb [8086] JMPFAR mem16 ; o16 FF /5 [8086] JMPFAR mem32 ; o32 FF /5 [386] FADDTO fpureg ; DC C0+r [8086,FPU] FDIVTO fpureg ; DC F8+r [8086,FPU] FDIVRTO fpureg ; DC F0+r [8086,FPU] FMULTO fpureg ; DC C8+r [8086,FPU] FSUBTO fpureg ; DC E8+r [8086,FPU] FSUBRTO fpureg ; DC E0+r [8086,FPU] CMP r/m16,imm8 ; o16 83 /7 ib [8086] CMP r/m32,imm8 ; o32 83 /7 ib [386] SAR r/m16,1 ; o16 D1 /7 [8086] SAR r/m32,1 ; o32 D1 /7 [386] ' end