EDASS-128-TEXT-OUTPUT-with-$FFD2 -------------------------------------------------------------------------------------------------- TOOL: EDASS-128 {Commodore C128 EDITOR & ASSEMBLER} Language: Assembler Extra: - Author: Misel Zivanovic Note: (C) 8th FEB 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- Last time we were fighting with .TEXT text output to screen and we managed to have a solution for it! Later i was wondering if KERNAL $ffd2 routine could be used to achieve the same result and on top of that even get extras like using the Commodore Control Characters to change colors and control many other things. That will be the lesson for today! --------------------------------------------------------------------------------------------------- EXAMPLE 1: --------------------------------------------------------------------------------------------------- What in previous lesson started to show results in 3rd Example, it's here already visible in 1st Example and it works just fine. HOWEVER, what i am missing here is the correct positioning of the string start address. I mean, it should start there where we want it! ffd2text.asm -a:0010-a: -e: ;-------------------------------------- *= $1300 .obj m .bank 15 ;-------------------------------------- ; lda #$93 ; clear screen jsr $ffd2 ; ldx #$00 loop lda mytxt,x jsr $ffd2 inx cpx #51 bne loop rts ; mytxt .text "Commodore c128! ",$0d .text "THIS is working!",$0d .text $0d,"withOUT IssUes! " --------------------------------------------------------------------------------------------------- EXAMPLE 2: --------------------------------------------------------------------------------------------------- Now can we add the start address and achieve the same results as in previous lessons. Basically we just need to add the KERNAL plot routine to the existing code. And done! Okay, this is a nice alternative way to bring text on the screen. Adding this KERNAL plot lines wasn't a rocket science and now it is working nice. And it isn't complex as the previous lesson {with STA or POKE in BASIC} ffd2text.asm -a:0011-a: -e: ;-------------------------------------- *= $1300 .obj m .bank 15 ;-------------------------------------- ; lda #$93 ; clear screen jsr $ffd2 ; clc ;position ldx #$05 ;row [0-24] ldy #$05 ;column [0-39] jsr $c018 inc $d020 ; ldx #$00 loop lda mytxt,x jsr $ffd2 inx cpx #34 bne loop rts ; mytxt .text "Commodore C128 " .text "where it should be!" --------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- EXAMPLE 3: {very probably coming soon! do not bet on it! Haha...} --------------------------------------------------------------------------------------------------- I have here on my mind the following: USING THIS PLOT ROUTINE AND $FFD2 to delete a screen. I know, it has very little to do with the text output. Hey, it's just an idea... It would be a screen deletion with a glorious touch of style, hehe... Maybe I'll do it... One day! Or how about: can you do it?