Prev: $3805 Up: Map Next: $38AC
$3868: Copy the text graphic buffer to the screen
Used by the routines at $2573, $2BB0 and $BE09.
Input
X Character cell x-coordinate (0-39)
Y Character cell y-coordinate (0-24)
($31) Number of bytes to copy (64 or 128)
$3868 LDA #$E0 Prepare to address the screen bitmap at $E000.
$386A STA $4F
$386C LDA #$00
$386E STA $4E
$3870 INC $4F Adjust the screen bitmap address at $4E to correspond to the given coordinates in X and Y.
$3872 LDA $4E
$3874 CLC
$3875 ADC #$40
$3877 BCC $387B
$3879 INC $4F
$387B STA $4E
$387D DEY
$387E BNE $3870
$3880 LDA $4E
$3882 CLC
$3883 ADC #$08
$3885 BCC $3889
$3887 INC $4F
$3889 STA $4E
$388B DEX
$388C BNE $3880
$388E SEC
$388F SBC #$C0
$3891 BCS $3895
$3893 DEC $4F
$3895 STA $4E
$3897 LDA #$45 Prepare to address the text graphic buffer at $4500.
$3899 STA $51
$389B LDA #$00
$389D STA $50
$389F LDY #$FF Copy the specified portion of the text graphic buffer to the screen.
$38A1 LDX $31
$38A3 LDA ($50),Y
$38A5 STA ($4E),Y
$38A7 DEY
$38A8 DEX
$38A9 BNE $38A3
$38AB RTS
Prev: $3805 Up: Map Next: $38AC