diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-05-28 21:19:55 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-05-28 21:19:55 -0700 |
commit | ef033e39c170fe272a956b1417f217a0d3cce29c (patch) | |
tree | 0ca08ba1614e87cee73f4904ea362928565b2531 /runtime_32.S | |
parent | 632c82bd63a13da242c90a5d93dfe7482a0bebe6 (diff) | |
parent | 6817ef558d165b50a9b08a337dd93c4f1f46304e (diff) |
Merge windows branch with latest changes
Diffstat (limited to 'runtime_32.S')
-rw-r--r-- | runtime_32.S | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/runtime_32.S b/runtime_32.S deleted file mode 100644 index 1f0c503..0000000 --- a/runtime_32.S +++ /dev/null @@ -1,74 +0,0 @@ - - -invalid_msg: - .asciz "Invalid instruction at %X\n" - - .global m68k_invalid -m68k_invalid: - push %ecx - push invalid_msg - xor %eax, %eax - call printf - push $1 - call exit - - .global bcd_add -bcd_add: - xchg %eax, %edi - - mov %cl, %ch - mov %al, %ah - and $0xF, %ch - and $0xF, %ah - and $0xF0, %cl - and $0xF0, %al - add %ah, %ch - cmp $10, %ch - jb no_adjust - add $6, %ch -no_adjust: - add %ch, %al - add %al, %cl - mov $0, %ch - jc def_adjust - cmp $0xA0, %cl - jb no_adjust_h -def_adjust: - add $0x60, %cl - mov $1, %ch -no_adjust_h: - - mov %edi, %eax - ret - - .global bcd_sub -bcd_sub: - xchg %eax, %edi - - mov %cl, %ch - mov %al, %ah - and $0xF, %ch - and $0xF, %ah - and $0xF0, %cl - and $0xF0, %al - sub %ah, %ch - cmp $10, %ch - jb no_adjusts - sub $6, %ch -no_adjusts: - add %ch, %cl - sub %al, %cl - mov $0, %ch - jc def_adjusts - cmp $0xA0, %cl - jb no_adjust_hs -def_adjusts: - sub $0x60, %cl - mov $1, %ch -no_adjust_hs: - - mov %edi, %eax - ret - - - |