Add MS BASIC equality test in similarity.c

Plus fixing mistakes
This commit is contained in:
Rikard Nordgren authored and FeralChild64 committed 2026-02-01 18:35:00 +01:00
1 parent 5165d3a9b1
commit 71a0f2d769
7 files changed
+13 -7

No files matched your search

+1
View File
@@ -39,6 +39,7 @@ inv_FAC1_mantissa:
lda FACOV
eor #$FF
sta FACOV
inc FACOV
bne inc_FAC1_ret
; Fallthrough to inc_FAC1
+1 -1
View File
@@ -45,7 +45,7 @@ shiftr_FAC:
sbc #8 ; Go back to previous value
tay
lda FACOV
bcs shiftr_FAC
bcs shftrt
.sext:
asl 1,X
bcc @2
+2 -1
View File
@@ -5,5 +5,6 @@
; Just a compatibility jump - our routine is longer than original one
jmp round_FAC1
round_FAC1:
jmp round_FAC1_impl
+1 -1
View File
@@ -12,7 +12,7 @@
; XXX test this
round_FAC1:
round_FAC1_impl:
; If number is 0, do not do anything
+2 -2
View File
@@ -20,7 +20,7 @@
mov_r_FAC1_VAR:
ldx #FORPNT+0
ldy #FORPNT+1
ldx FORPNT+0
ldy FORPNT+1
; FALLTROUGH to mov_r_FAC1_MEM
+1 -1
View File
@@ -32,7 +32,7 @@ mov_FAC2_FAC1:
lda FAC2_sign
mov_FAC2_FAC1_sign:
sta FAC2_sign
sta FAC1_sign
; Copy the mantissa and the exponent
+5 -1
View File
@@ -92,7 +92,11 @@ int main(int argc,char **argv)
if (basic) {
for (int i = 0; i < NUM_CHUNKS; i++) {
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;
}
}
}