home *** CD-ROM | disk | FTP | other *** search
- ORBitmapUp
- PRG formatted GEOS file V1.0
- Epson MX-80
- COLORUTILS
- BLASTER'S CONVERTER V2.5
- LF.POEM
- LFP.SEA
- Write Image V2.0
- geoWrite V2.1
- ;ORBitmapUp performs a BitmapUp-type operation, but instead of overwriting the forground screen, it
- ;merges the new bitmap with whatever is currently on the foreground screen.
- ;ORBitmapUp takes the same parameters as the normal BitmapUp, but for proper operation R1H should be
- ;on a card boundry (which means it should be a multiple of 8). ALL registers a
- preserved, and that
- ;means R0-R15, A0-A15, a,x,y.
- ;NOTE! ORBitmapUp REQUIRES that the file 'rsave.rel' be linked in along with 'ORBitmapUp.rel'!!
- ;AUTHOR: Kent L. Smotherman, July 1992 (Kent LS on Q-Link)
- .noeqin
- .noglbl
- .if Pass1
- .include geosSym
- .include geosMac
- .endif
- .eqin
- .glbl
- ORBitmapUp: jsr saveall ;rsave.rel rout
- .noeqin
- .noglbl
- .if Pass1
- .include geosSym
- .include geosMac
- .endif
- .eqin
- .glbl
- ORBitmapUp: jsr sav
- ll ;rsave.rel routine
- lda dispBuff ;remember
- LoadB dispBuff,#ST_WR_BACK ;bring in bitmap to background
- jsr BitmapUp
- LoadB dispBuff,#ST_WR_FORE | ST_WR_BACK ;need this for GetScanLine!
- ldx r0save+3 ;really r1H
- jsr GetScanLine ;address screen ram
- lda r0save+2 ;really r1L
- asl a ;convert byte to pixel
- asl a ;-by multiplying by 8
- asl a ;-(which is the same as 3 shift lefts)
- pha ;remember
- adc r5L ;add in forground screen address for top of bitmap
- sta r5L ;=
- lda r5H ;=
- adc #0 ;=
- sta r5
- pla ;recall
- adc r6L ;do the same for background screen address
- sta r6L ;=
- lda r6H ;=
- adc #0 ;=
- sta r6H ;=
- lda r0save+5 ;reall r2H
- lsr a ;convert bitmap height to bytes
- lsr a ;by dividing by 8
- lsr a ;(save as 3 right shifts)
- sta r2H
- 2$: ldy #0
- MoveB r0save+4,r2L
- 1$: ldx #8
- 0$: lda (r5),y
- ora (r6),y ;OR the background into the foreground
- sta (r5),y
- bne 0$ ;do one card at a time
- dec r2L
- bne 1$ ;for the defined width of the bitmap
- AddVW #320,r5 ;next card address in forgro
- AddVW #320,r6 ;next card address in background
- dec r2H
- bne 2$ ;do for defined BYTE height of bitmap
- pla ;restore dispBuff
- sta dispBuff
- jmp loadall ;restore all regs and return via RTS in loadall
-