diff code_part1/OSTC_code_asm_part1/dump_screen.asm @ 477:1b09cead63a8

BUGFIX dump screen top line in flip mode (OSTC 2N).
author JeanDo
date Mon, 10 Oct 2011 01:15:14 +0200
parents 9ee86a19f1fa
children 6e456a6398e0
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/dump_screen.asm	Sun Oct 09 23:37:59 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/dump_screen.asm	Mon Oct 10 01:15:14 2011 +0200
@@ -72,9 +72,18 @@
     AA_DATA_WRITE   0x00
     AA_DATA_WRITE   0xEF
 
+    btfss       win_flip_screen         ; OSTC 2N have a flipped screen,
+    bra         dump_screen_mk2         ; So we should start 239 instead.
+    movlw       LOW(.239)
+    movwf       PRODL
+    movlw       HIGH(.239)
+    movwf       PRODH
+dump_screen_mk2:    
+
     AA_CMD_WRITE    0x20                ; Start Address Horizontal (.0 - .239)
     AA_DATA_WRITE_PROD                  ; 00:00
 
+    mullw       0                       ; Make sure PROD is 0 again.
     AA_CMD_WRITE    0x21                ; Start Address Vertical (.0 - .319)
     AA_DATA_WRITE_PROD                  ; 00:00