Merge branch 'master' of https://codeberg.org/eaxcc/eaxcc
This commit is contained in:
@ -5,38 +5,22 @@
|
||||
#include "../source/assembler.c"
|
||||
|
||||
int main (void) {
|
||||
token_array = malloc (144UL * sizeof (* token_array));
|
||||
unsigned int index;
|
||||
|
||||
assemble (OPERATION_ADD_F, SIZE_64B,
|
||||
TYPE_REGISTER, OPERAND_REGISTER_1,
|
||||
TYPE_REGISTER, OPERAND_REGISTER_2);
|
||||
output_array = malloc (144UL * sizeof (* output_array));
|
||||
|
||||
assemble (OPERATION_ADD_F, SIZE_32B,
|
||||
TYPE_REGISTER, OPERAND_REGISTER_1,
|
||||
TYPE_VARIABLE, 12);
|
||||
build_regular (ADC, D64, REG, R1, REG, R2);
|
||||
build_regular (ADC, D32, REG, R1, MEM, 12);
|
||||
build_regular (ADC, D16, MEM, 12, REG, R10);
|
||||
build_regular (ADC, D8, REG, R3, IMM, 0X77);
|
||||
build_special_1 (LOCK);
|
||||
build_special_2 (PAUSE);
|
||||
|
||||
assemble (OPERATION_ADD_F, SIZE_16B,
|
||||
TYPE_VARIABLE, 12,
|
||||
TYPE_REGISTER, OPERAND_REGISTER_A);
|
||||
|
||||
assemble (OPERATION_ADD_F, SIZE_8B,
|
||||
TYPE_REGISTER, OPERAND_REGISTER_3,
|
||||
TYPE_CONSTANT, 0X77);
|
||||
|
||||
for (int index = 0; index < token_count; ++index) {
|
||||
printf ("%02X \n", token_array [index]);
|
||||
for (index = 0; index < output_count; ++index) {
|
||||
printf ("%02X \n", output_array [index]);
|
||||
}
|
||||
|
||||
free (token_array);
|
||||
free (output_array);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
//~xor rcx rdx
|
||||
//~48 31 D1
|
||||
//~WORKS AS EXPECTED!
|
||||
|
||||
//~90 48 11 D1
|
||||
//~90 13 0D 14 10 00 00
|
||||
//~90 66 44 11 15 09 10 00 00
|
||||
//~90 80 D3 77
|
||||
|
@ -153,19 +153,6 @@ entry $
|
||||
nop
|
||||
nop
|
||||
|
||||
nop
|
||||
adc rcx, rdx; 48 31 D1
|
||||
nop
|
||||
adc ecx, [x4]; 33 0D 14 10 00 00
|
||||
nop
|
||||
adc [x2], r10w; 66 44 31 15 09 10 00 00
|
||||
nop
|
||||
adc bl, 077h; 80 F3 77
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
nop
|
||||
enter 2, 2
|
||||
nop
|
||||
@ -180,6 +167,77 @@ entry $
|
||||
sysexit
|
||||
nop
|
||||
cpuid
|
||||
nop
|
||||
movbe rax, [x8]
|
||||
nop
|
||||
movbe rcx, [x8]
|
||||
nop
|
||||
movsq
|
||||
nop
|
||||
neg rax
|
||||
nop
|
||||
neg dword[x4]
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
nop
|
||||
inc byte[x1]
|
||||
nop
|
||||
inc word[x2]
|
||||
nop
|
||||
inc dword[x4]
|
||||
nop
|
||||
inc qword[x8]
|
||||
nop
|
||||
inc cl
|
||||
nop
|
||||
inc cx
|
||||
nop
|
||||
inc ecx
|
||||
nop
|
||||
inc rcx
|
||||
nop
|
||||
inc r9b
|
||||
nop
|
||||
inc r9w
|
||||
nop
|
||||
inc r9d
|
||||
nop
|
||||
inc r9
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
nop
|
||||
adc rcx, rdx; 48 31 D1
|
||||
nop
|
||||
adc ecx, [x4]; 33 0D 14 10 00 00
|
||||
nop
|
||||
adc [x2], r10w; 66 44 31 15 09 10 00 00
|
||||
nop
|
||||
adc bl, 077h; 80 F3 77
|
||||
;~assemble (ADC, D64, REG, R1, REG, R2);
|
||||
;~assemble (ADC, D32, REG, R1, MEM, 12);
|
||||
;~assemble (ADC, D16, MEM, 12, REG, R10);
|
||||
;~assemble (ADC, D8, REG, R3, IMM, 0X77);
|
||||
;~48 11 D1
|
||||
;~13 0D 14 10 00 00
|
||||
;~66 44 11 15 09 10 00 00
|
||||
;~80 D3 77
|
||||
;~48
|
||||
;~11
|
||||
;~D1
|
||||
;~13
|
||||
;~0D
|
||||
;~66
|
||||
;~44
|
||||
;~11
|
||||
;~15
|
||||
;~80
|
||||
;~D3
|
||||
|
||||
nop
|
||||
|
||||
|
Reference in New Issue
Block a user