home *** CD-ROM | disk | FTP | other *** search
/ Syzygy Magazine 7 / Syzygy_Magazine_7_1999___pl_Disk_2_of_2_Side_B.atr / lekcja.arc / PREPFNT.ASM < prev    next >
Assembly Source File  |  1999-09-09  |  2KB  |  1 lines

  1. * PREP_FNT by Charlie/Tristesse¢¢* Parameters:¢¢* A   - adress of fonts (MSB),¢* XY  - adress of fonts'-length-table,¢* C=1 - prepare for EED,¢* C=0 - normal fonts;¢¢* Page zero:¢¢_pnt equ $38 (2)¢¢* Routine does not start here!¢¢_eed lda act_fnt¢     ldx act_spc¢     cmp _spaces,x¢     bne nspc¢     ldy #7¢     lda #0¢     sta (_pnt),y¢     dey¢     bpl *-3¢     inc act_spc¢     ldy len_spc,x¢     tya¢     jmp done¢¢* Routine starts here!¢¢prep_fnt equ *¢¢     sta _pnt+1¢     stx done+4¢     sty done+5¢     lda #0¢     sta _pnt¢     tay¢     ror @¢     sta mode¢     sty act_fnt¢     sty act_spc¢¢next lda mode¢     bmi _eed¢nspc ldx #0¢     ldy #0¢     lda (_pnt),y¢     iny¢     ora (_pnt),y¢     cpy #7¢     bcc *-5¢     sta mask¢     and #%10000001¢     cmp #$80¢     beq _lsr¢     lda mask¢     beq _spc¢     bit mask¢     bvs _clc¢_how inx¢     asl mask¢     bit mask¢     bvc _how¢     stx shift¢_lft lda (_pnt),y¢     asl @¢     dex¢     bne _lft+2¢     sta (_pnt),y¢     dey¢     bmi _clc¢     ldx shift¢     bne _lft  (jmp)¢_clc clc¢     lda mask¢     lsr @¢     bcs _num¢     inx¢     bne *-4   (jmp)¢_num txa¢     sbc #8¢     eor #$ff¢     adc #1¢done ldx act_fnt¢     sta *,x¢     inc act_fnt¢     bpl *+3¢     rts       ;quit¢     clc¢     lda #8¢     adc _pnt¢     sta _pnt¢     bcc next¢     inc _pnt+1¢     bne next  (jmp)¢_spc lda #$80¢     bmi done  (jmp)¢_lsr ldy #7¢     lda (_pnt),y¢     lsr @¢     sta (_pnt),y¢     dey¢     bpl _lsr+2¢     lsr mask¢     bne _clc  (jmp)¢¢_spaces equ *¢ dta b($00),b($40),b($42),b($46),b($47),b($48),b($49),b($4a)¢ dta b($54),b($55),b($57),b($59),b($5b),b($5c),b($5d),b($5e)¢ dta b($5f),b($7d),b($7e),b($7f)¢¢len_spc equ *¢ dta b($04),b($a0),b($90),b($85),b($86),b($87),b($84),b($88)¢ dta b($81),b($83),b($80),b($82),b($80),b($80),b($80),b($80)¢ dta b($80),b($80),b($80),b($00)¢¢* Variables¢¢act_fnt org *+1¢act_spc org *+1¢mask    org *+1¢mode    org *+1¢shift   org *+1¢¢ end of lib.¢