Fixed first letter of comments (should be upper case).
This commit is contained in:
parent
71420223bc
commit
ba5b580368
3 changed files with 14 additions and 14 deletions
|
@ -14,16 +14,16 @@
|
|||
tosdiva0:
|
||||
ldx #0
|
||||
tosdivax:
|
||||
pha ; check if high-bytes indicate
|
||||
txa ; different sign, so that we
|
||||
ldy #1 ; negate the result after the operation
|
||||
eor (sp),y ; eor with lhs high byte
|
||||
sta tmp1 ; save post negation indicator to tmp1
|
||||
pla ; back to entry accu
|
||||
pha ; Check if high-bytes indicate
|
||||
txa ; different sign, so that we have to
|
||||
ldy #1 ; negate the result after the operation.
|
||||
eor (sp),y ; Eor with lhs high byte
|
||||
sta tmp1 ; Save post negation indicator to tmp1
|
||||
pla ; Back to entry accu
|
||||
jsr absvaludiv16
|
||||
ldx ptr1+1
|
||||
lda ptr1
|
||||
ldy tmp1 ; fetch indicator
|
||||
ldy tmp1 ; Fetch indicator
|
||||
bmi negate
|
||||
rts
|
||||
negate: jmp negax
|
||||
|
|
|
@ -19,14 +19,14 @@ tosmodax:
|
|||
; modulo operation is the same as that of the left operand.
|
||||
|
||||
pha
|
||||
ldy #1 ; prepare lhs operant hi-byte fetch
|
||||
ldy #1 ; Prepare lhs operant hi-byte fetch
|
||||
lda (sp),y
|
||||
sta tmp1 ; save post negation indicator to tmp1
|
||||
pla ; back to entry accu
|
||||
sta tmp1 ; Save post negation indicator to tmp1
|
||||
pla ; Back to entry accu
|
||||
jsr absvaludiv16
|
||||
ldx sreg+1 ; remainder to return registers
|
||||
ldx sreg+1 ; Remainder to return registers
|
||||
lda sreg
|
||||
ldy tmp1 ; fetch indicator
|
||||
ldy tmp1 ; Fetch indicator
|
||||
bmi negate
|
||||
rts
|
||||
negate: jmp negax
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
.export negax
|
||||
.export _abs
|
||||
|
||||
_abs: cpx #$00 ; test hi byte
|
||||
bpl L1 ; don't touch if positive
|
||||
_abs: cpx #$00 ; Test hi byte
|
||||
bpl L1 ; Don't touch if positive
|
||||
negax: clc
|
||||
eor #$FF
|
||||
adc #1
|
||||
|
|
Loading…
Add table
Reference in a new issue