summaryrefslogtreecommitdiff
path: root/alu.s
diff options
context:
space:
mode:
authorAstrid Smith2011-10-21 01:14:17 -0700
committerAstrid Smith2011-10-21 01:14:17 -0700
commitde8e7b57b32f09271408be8b75b8924021af10ff (patch)
treefa295b7ef088278404d5d944b70d64e7c74175e0 /alu.s
parent541bce94a4d73e754ce522758dd25ecddb818f04 (diff)
Changed comment markers
Doubtless Github will hate me now.
Diffstat (limited to 'alu.s')
-rw-r--r--alu.s51
1 files changed, 26 insertions, 25 deletions
diff --git a/alu.s b/alu.s
index 22594bd..0602807 100644
--- a/alu.s
+++ b/alu.s
@@ -1,13 +1,14 @@
- ;; Parting out the big math/logic routines from the
- ;; instruction dispatch table.
+ || -*- gas -*-
+ || Parting out the big math/logic routines from the
+ || instruction dispatch table.
.text
alu_add:
- ;; ADD instruction
- ;; ADD d1,d0
- ;; d1 + d0 -> d1
- move.b d0,f_tmp_src_b ; preserve operands for flag work
+ || ADD instruction
+ || ADD d1,d0
+ || d1 + d0 -> d1
+ move.b d0,f_tmp_src_b | preserve operands for flag work
move.b d1,f_tmp_dst_b
move.b #1,f_tmp_byte
add d0,d1
@@ -16,9 +17,9 @@ alu_add:
rts
alu_adc:
- ;; ADC instruction
- ;; ADC d1,d0
- ;; d1 + d0 + carry -> d1
+ || ADC instruction
+ || ADC d1,d0
+ || d1 + d0 + carry -> d1
bsr flags_normalize
move.b flag_byte(pc),d2
andi.b #1,d2
@@ -31,10 +32,10 @@ alu_adc:
rts
alu_sbc:
- ;; SBC instruction
- ;; SBC d1,d0
- ;; d1 - (d0+C) -> d1
- ;; sets flags
+ || SBC instruction
+ || SBC d1,d0
+ || d1 - (d0+C) -> d1
+ || sets flags
push.l d2
bsr flags_normalize
@@ -51,14 +52,14 @@ alu_sbc:
rts
alu_sub:
- ;; SUB instruction
- ;; SUB d1,d0
- ;; d1 - d0 -> d1
- ;; sets flags
+ || SUB instruction
+ || SUB d1,d0
+ || d1 - d0 -> d1
+ || sets flags
- ;; XXX use lea and then d(an) if you have a spare register.
+ || XXX use lea and then d(an) if you have a spare register.
- ;; preserve operands for flagging
+ || preserve operands for flagging
move.b d0,f_tmp_src_b
move.b d1,f_tmp_dst_b
move.b #1,f_tmp_byte
@@ -69,22 +70,22 @@ alu_sub:
rts
alu_and:
- ;; XXX do this
+ || XXX do this
rts
alu_xor:
- ;; XXX do this
+ || XXX do this
rts
alu_or:
- ;; XXX do this
+ || XXX do this
rts
alu_cp:
- ;; Same as SUB but the macro that calls this doesn't save the
- ;; result.
+ || Same as SUB but the macro that calls this doesn't save the
+ || result.
- ;; SPEED can hardcode one of the arguments to always be the A register.
+ || SPEED can hardcode one of the arguments to always be the A register.
move.b d0,f_tmp_src_b
move.b d1,f_tmp_dst_b
move.b #1,f_tmp_byte