From: Nick Downing Date: Mon, 25 Jul 2022 17:05:02 +0000 (+1000) Subject: Switch to tidied up sim68xx repo (hopefully this will be accepted upstream too) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=df49f388b7e07d6ff29bf0460f3634a190462e8c;p=multi_emu.git Switch to tidied up sim68xx repo (hopefully this will be accepted upstream too) --- diff --git a/basic_test.txt b/basic_test.txt index 6a007bd..792fc49 100644 --- a/basic_test.txt +++ b/basic_test.txt @@ -15,7 +15,7 @@ Y 120 REM A9=ATN(X9) === GOSUB 60310 130 X9=.8:GOSUB 60310:PRINT ATN(.8),A9 140 END -60000 REM EXPONENTIATI0N: P9=X9^Y9 +60000 REM EXPONENTIATION: P9=X9^Y9 60010 REM NEED: EXP, LOG 60020 REM VARIABLES USED: A9,B9,C9,E9,L9,P9,X9,Y9 60030 P9=1 : E9=0 : IF Y9=0 THEN RETURN @@ -24,17 +24,17 @@ Y 60060 P9=P9*E9 : RETURN 60070 REM NATURAL LOGARITHM: L9=LOG(X9) 60080 REM VARIABLES USED: A9,B9,C9,E9,L9,X9 -60090 E9=0 : IF X9<=0 THEN PRINT "LOG FC ERROR"; : ST0P +60090 E9=0 : IF X9<=0 THEN PRINT "LOG FC ERROR"; : STOP 60095 A9=1 : B9=2 : C9=.5 : REM THIS WILL SPEED UP THE FOLLOWING 60100 IF X9>=A9 THEN X9=C9*X9 : E9=E9+A9 : GOTO 60100 60110 IF X90 THEN PRINT "EXP OV ERR0R"; : STOP +60170 IF X9>0 THEN PRINT "EXP OV ERROR"; : STOP 60175 E9=0 : RETURN 60180 E9=.693147*L9-X9 : A9=1.32988E-3-1.41316E-4*E9 60190 A9=((A9*E9-8.30136E-3)*E9+4.16574E-2)*E9 diff --git a/cpu_6800.h b/cpu_6800.h index b15bd1f..cc68fdb 100644 --- a/cpu_6800.h +++ b/cpu_6800.h @@ -302,6 +302,7 @@ static ALWAYS_INLINE void cpu_6800_cl(struct cpu_6800 *self, int n) { } static ALWAYS_INLINE void cpu_6800_clr(struct cpu_6800 *self, int lvalue) { + cpu_6800_read_byte(self, lvalue); // clr is implemented as RMW like inc/dec cpu_6800_write_byte(self, lvalue, 0); self->regs.bit.nf = false; diff --git a/sim68xx b/sim68xx index 8b65ae6..c93ed6d 160000 --- a/sim68xx +++ b/sim68xx @@ -1 +1 @@ -Subproject commit 8b65ae6a4c8169cc40844026d472d97bdcde3e2f +Subproject commit c93ed6d6ddea2af58fd9ffb09081162b02378eb5