changeset 2993:c8447904d57b

sierra: Fix clear.text.rect command in mnln.asm There was a problem with arguments pushed onto the stack before calling a subroutine. The fix is 4 bytes shorter than the original code so an fcb directive is added to keep the following code at the same address. The syntax of the clear.text.rect command is: clear.text.rect(byt row1, byt col1, byt row2, byt col2, byt color); All parameters are 8-bit values. row1 and row2 can be between 0 and 23, col1 and col2 can be between 0 and 39.
author Guillaume Major <guillaume.major@gmail.com>
date Sat, 26 Apr 2014 18:29:17 +0200
parents 1d9ec36546c0
children e4f66f4635e1
files 3rdparty/packages/sierra/objs_lsl/mnln.asm
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/3rdparty/packages/sierra/objs_lsl/mnln.asm	Mon Apr 14 00:30:18 2014 +0200
+++ b/3rdparty/packages/sierra/objs_lsl/mnln.asm	Sat Apr 26 18:29:17 2014 +0200
@@ -29,6 +29,7 @@
 * April 28, 2010 - Adjusting the RS-232 input direction seems to cause other problems, probably at the other
 *                 end of the RS-232 connection. I've gone back to masking the bit at $FF20. RG
 * April 4,  2014 - Corrected the set.pri.base routine used in KQ4. GM & RG
+* April 21, 2014 - Corrected the clear.text.rect routine. GM
 
 *  >$0154  flag for using extended lookups
 *  >$0541  joystick button status
@@ -7646,21 +7647,22 @@
          leay  $03,y
          rts   
 
+* clear text rect (fixed)
 L484E    ldb   $04,y
          pshs  b,a
          ldb   $03,y
-         pshs  b,a
-         ldb   $02,y
+         lda   $02,y
          pshs  b,a
          ldb   $01,y
-         pshs  b,a
-         ldb   ,y
+         lda   ,y
          pshs  b,a
          lbsr  L4B56
-         leas  $0A,s
+         leas  $06,s
          leay  $05,y
          rts   
 
+         fcb   0,0,0,0  * to keep same code length
+
 L486A    ldd   ,y++
          bsr   L486F
          rts