Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/dump_screen.asm @ 681:6e456a6398e0
Hardware4 support
author | heinrichsweikamp |
---|---|
date | Fri, 25 Jan 2013 18:00:49 +0100 |
parents | 1b09cead63a8 |
children | a8a36c85e031 |
comparison
equal
deleted
inserted
replaced
680:c6220d340684 | 681:6e456a6398e0 |
---|---|
56 ;============================================================================= | 56 ;============================================================================= |
57 ; Dump screen contains to the UART | 57 ; Dump screen contains to the UART |
58 | 58 |
59 dump_screen_0: | 59 dump_screen_0: |
60 | 60 |
61 ;---- Send OLED box command for the full screen window ------------------- | 61 ;---- Send DISPLAY box command for the full screen window ------------------- |
62 mullw 0 ; PRODH:L <- 0 | 62 mullw 0 ; PRODH:L <- 0 |
63 | 63 |
64 AA_CMD_WRITE 0x35 ; VerticalStartAddress HIGH:LOW | 64 AA_CMD_WRITE 0x35 ; VerticalStartAddress HIGH:LOW |
65 AA_DATA_WRITE_PROD ; 00:00 | 65 AA_DATA_WRITE_PROD ; 00:00 |
66 | 66 |
86 mullw 0 ; Make sure PROD is 0 again. | 86 mullw 0 ; Make sure PROD is 0 again. |
87 AA_CMD_WRITE 0x21 ; Start Address Vertical (.0 - .319) | 87 AA_CMD_WRITE 0x21 ; Start Address Vertical (.0 - .319) |
88 AA_DATA_WRITE_PROD ; 00:00 | 88 AA_DATA_WRITE_PROD ; 00:00 |
89 | 89 |
90 AA_CMD_WRITE 0x22 ; Start reading. | 90 AA_CMD_WRITE 0x22 ; Start reading. |
91 rcall PLED_DataRead ; Dummy pixel to skip. | 91 rcall DISP_DataRead ; Dummy pixel to skip. |
92 rcall PLED_DataRead ; Dummy pixel to skip. | 92 rcall DISP_DataRead ; Dummy pixel to skip. |
93 | 93 |
94 movlw .160 ; 160x2 columns | 94 movlw .160 ; 160x2 columns |
95 movwf ds_column | 95 movwf ds_column |
96 rcall dump_screen_pixel_reset | 96 rcall dump_screen_pixel_reset |
97 | 97 |
104 | 104 |
105 ; Dump even column | 105 ; Dump even column |
106 movlw .240 ; 240 lines, once. | 106 movlw .240 ; 240 lines, once. |
107 movwf ds_line | 107 movwf ds_line |
108 dump_screen_2: | 108 dump_screen_2: |
109 rcall PLED_DataRead ; read pixel-high byte | 109 rcall DISP_DataRead ; read pixel-high byte |
110 movwf PRODH | 110 movwf PRODH |
111 rcall PLED_DataRead ; read pixel-low byte | 111 rcall DISP_DataRead ; read pixel-low byte |
112 movwf PRODL | 112 movwf PRODL |
113 rcall dump_screen_pixel | 113 rcall dump_screen_pixel |
114 | 114 |
115 decfsz ds_line,F | 115 decfsz ds_line,F |
116 bra dump_screen_2 | 116 bra dump_screen_2 |
118 | 118 |
119 ; Dump odd column | 119 ; Dump odd column |
120 movlw .240 ; 240 lines, twice. | 120 movlw .240 ; 240 lines, twice. |
121 movwf ds_line | 121 movwf ds_line |
122 dump_screen_3: | 122 dump_screen_3: |
123 rcall PLED_DataRead ; read pixel-high byte | 123 rcall DISP_DataRead ; read pixel-high byte |
124 movwf PRODH | 124 movwf PRODH |
125 rcall PLED_DataRead ; read pixel-low byte | 125 rcall DISP_DataRead ; read pixel-low byte |
126 movwf PRODL | 126 movwf PRODL |
127 rcall dump_screen_pixel | 127 rcall dump_screen_pixel |
128 | 128 |
129 decfsz ds_line,F | 129 decfsz ds_line,F |
130 bra dump_screen_3 | 130 bra dump_screen_3 |