Prev: 64256 Up: Map Next: 64441
64265: Display Frame
Copies one frame of the picture held in the buffer at PictureBuffer to the screen: first the pixel rows, then the attributes from PictureBuffer_Attributes. Called by BASIC as "ins" (64265) with the frame number POKEd into DisplayFrame_Number.
The routine works out the frame's row and column in the sheet from *DisplayFrame_Number and *DisplayFrame_PerRow, converts those to byte offsets with DisplayFrame_CalculateOffset, and copies *DisplayFrame_Height character rows of *DisplayFrame_LineWidth bytes from the buffer to the screen at *DisplayFrame_Column / *DisplayFrame_Row. It then copies the matching attributes from the buffer (offset by 6144) to the attribute file.
The values in the snapshot describe rows of 4 frames of 8 by 10 characters, copied to column 25 row 3 after line 60.
DisplayFrame 64265 DI Disable interrupts.
64266 LD (65398),SP
64270 LD SP,65470
64273 LD A,(64259)
64276 LD B,A
64277 LD C,1
64279 LD A,(64258)
64282 DEC A
DisplayFrame_0 64283 CP B
64284 JR C,DisplayFrame_1
64286 SUB B
64287 INC C
64288 JR DisplayFrame_0
DisplayFrame_1 64290 INC A
64291 LD B,A
64292 LD HL,64260
64295 XOR A
64296 DEC B
64297 JR Z,DisplayFrame_3
DisplayFrame_2 64299 ADD A,(HL)
64300 DJNZ DisplayFrame_2
DisplayFrame_3 64302 LD B,C
64303 LD C,A
64304 LD HL,64261
64307 XOR A
64308 DEC B
64309 JR Z,DisplayFrame_5
DisplayFrame_4 64311 ADD A,(HL)
64312 DJNZ DisplayFrame_4
DisplayFrame_5 64314 LD L,A
64315 CALL DisplayFrame_CalculateOffset
64318 LD (64453),HL
64321 SLA H
64323 SLA H
64325 SLA H
64327 LD BC,(64256)
64331 ADD HL,BC
64332 EX DE,HL
64333 LD A,(64263)
64336 LD L,A
64337 LD A,(64262)
64340 LD C,A
64341 CALL DisplayFrame_CalculateOffset
64344 LD (64451),HL
64347 SLA H
64349 SLA H
64351 SLA H
64353 LD BC,16384
64356 ADD HL,BC
64357 EX DE,HL
64358 LD A,(64261)
64361 LD B,A
DisplayFrame_6 64362 PUSH BC
64363 LD B,0
DisplayFrame_7 64365 LD A,(64264)
64368 LD C,A
64369 PUSH HL
64370 PUSH DE
64371 LDIR
64373 POP DE
64374 POP HL
64375 CALL ScrollWindow_NextLine
64378 EX DE,HL
64379 CALL ScrollWindow_NextLine
64382 EX DE,HL
64383 JR NZ,DisplayFrame_7
64385 POP BC
64386 DJNZ DisplayFrame_6
64388 LD HL,(64453)
64391 LD BC,(64256)
64395 ADD HL,BC
64396 LD BC,6144
64399 ADD HL,BC
64400 EX DE,HL
64401 LD HL,(64451)
64404 LD BC,22528
64407 ADD HL,BC
64408 EX DE,HL
64409 LD A,(64261)
64412 LD IYl,A
64414 LD B,0
DisplayFrame_8 64416 LD A,(64264)
64419 LD C,A
64420 PUSH HL
64421 PUSH DE
64422 LDIR
64424 POP DE
64425 POP HL
64426 LD C,32
64428 ADD HL,BC
64429 EX DE,HL
64430 ADD HL,BC
64431 EX DE,HL
64432 DEC IYl
64434 JR NZ,DisplayFrame_8
64436 LD SP,(65398)
64440 RET
Prev: 64256 Up: Map Next: 64441