Add MS BASIC equality test in similarity.c
Plus fixing mistakes
This commit is contained in:
1 parent
5165d3a9b1
commit
71a0f2d769
7 files changed
+13
-7
No files matched your search
@@ -39,6 +39,7 @@ inv_FAC1_mantissa:
|
|||||||
lda FACOV
|
lda FACOV
|
||||||
eor #$FF
|
eor #$FF
|
||||||
sta FACOV
|
sta FACOV
|
||||||
|
inc FACOV
|
||||||
bne inc_FAC1_ret
|
bne inc_FAC1_ret
|
||||||
|
|
||||||
; Fallthrough to inc_FAC1
|
; Fallthrough to inc_FAC1
|
||||||
@@ -45,7 +45,7 @@ shiftr_FAC:
|
|||||||
sbc #8 ; Go back to previous value
|
sbc #8 ; Go back to previous value
|
||||||
tay
|
tay
|
||||||
lda FACOV
|
lda FACOV
|
||||||
bcs shiftr_FAC
|
bcs shftrt
|
||||||
.sext:
|
.sext:
|
||||||
asl 1,X
|
asl 1,X
|
||||||
bcc @2
|
bcc @2
|
||||||
|
|||||||
@@ -5,5 +5,6 @@
|
|||||||
|
|
||||||
; Just a compatibility jump - our routine is longer than original one
|
; Just a compatibility jump - our routine is longer than original one
|
||||||
|
|
||||||
jmp round_FAC1
|
round_FAC1:
|
||||||
|
jmp round_FAC1_impl
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
; XXX test this
|
; XXX test this
|
||||||
|
|
||||||
round_FAC1:
|
round_FAC1_impl:
|
||||||
|
|
||||||
; If number is 0, do not do anything
|
; If number is 0, do not do anything
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
mov_r_FAC1_VAR:
|
mov_r_FAC1_VAR:
|
||||||
|
|
||||||
ldx #FORPNT+0
|
ldx FORPNT+0
|
||||||
ldy #FORPNT+1
|
ldy FORPNT+1
|
||||||
|
|
||||||
; FALLTROUGH to mov_r_FAC1_MEM
|
; FALLTROUGH to mov_r_FAC1_MEM
|
||||||
@@ -32,7 +32,7 @@ mov_FAC2_FAC1:
|
|||||||
lda FAC2_sign
|
lda FAC2_sign
|
||||||
|
|
||||||
mov_FAC2_FAC1_sign:
|
mov_FAC2_FAC1_sign:
|
||||||
sta FAC2_sign
|
sta FAC1_sign
|
||||||
|
|
||||||
; Copy the mantissa and the exponent
|
; Copy the mantissa and the exponent
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -92,7 +92,11 @@ int main(int argc,char **argv)
|
|||||||
if (basic) {
|
if (basic) {
|
||||||
for (int i = 0; i < NUM_CHUNKS; i++) {
|
for (int i = 0; i < NUM_CHUNKS; i++) {
|
||||||
for (int addr = microsoft_basic_chunks[i * 2]; addr <= microsoft_basic_chunks[i * 2 + 1]; addr++) {
|
for (int addr = microsoft_basic_chunks[i * 2]; addr <= microsoft_basic_chunks[i * 2 + 1]; addr++) {
|
||||||
f1[addr - 0xA000] = 0;
|
short index = addr - 0xA000;
|
||||||
|
if (f1[index] != f2[index]) {
|
||||||
|
printf("BASIC does not match MS BASIC at %X (%X != %X)\n", addr, f1[index], f2[index]);
|
||||||
|
}
|
||||||
|
f1[index] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user