playground.darkbyte.sk

Place for ZX Spectrum freaks
It is currently Sat Sep 23, 2017 4:41 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Apr 13, 2017 1:16 pm 
Offline

Joined: Mon Nov 25, 2013 10:11 pm
Posts: 298
Location: Bratislava
Trik ako aj v 128 basicu vykreslit vysoke pismo pomocou LPRINTu:
Code:
POKE 23681,X
POKE 23749,244
POKE 23750,9
POKE 23680,0
POKE 23679,0
LPRINT "text";
Hodnota X je 64..87 podla potreby (ako obvykle), dva poky na 23749 a 23750 staci len raz na zaciatku, poky 23680 a 23679 je vhodne mat pred kazdym LPRINTom a LPRINT musi byt ukonceny bodkociarkou aby nevypisoval koncovy enter. Pri nesplneni tychto pomienok je crash systemu isty !

POKE 23749 a 23750 sluzia na presmerovanie kanalu "p" z povodnej v 128 basicu pouzivanej RS232 rutinky na klasicku ZX Printer rutinku, tak ako je to obvykle v 48 basicu.

POKE 23680 znamena znakovy stlpec od ktoreho sa ma napis vypisat.

POKE 23679 je pocitadlo poctu znakov, ktore sa po kazdom vypisanom znaku dekrementuje a ked dojde na nulu, nastane realny vypis na ZX Printer s naslednym zmazanim print buffera. A to by bolo pre 128 basic osudne pretoze v print bufferi ma ulozene dalsie systemove premenne a rutinky pre medziromkove skoky. Podobne tak aj vypis znaku enter (kod 13) sposobi realny vypis a vymazanie print buffera.

Vo vypisovanom retazci nepouzivajte riadiaci znak AT (kod 22), pretoze tento sice nastavi stlpec vypisu (23680), avsak vyssi bajt (23681) "zresetuje" na povodnu hodnotu 91 (vyssi bajt adresy print buffera) takze dalsi vypisovany znak sa zapise do print buffera, moze tym premazat nieco dolezite a dalsi crash je vysoko pravdepodobny.

Tento sposob je spetne plne kompatibilny, t.j. v pripade 48 basicu funguje klasicky podla ocakavania.


Last edited by Busy on Thu Apr 13, 2017 2:08 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Thu Apr 13, 2017 1:47 pm 
Offline

Joined: Mon Nov 25, 2013 10:11 pm
Posts: 298
Location: Bratislava
Priklad programu na vypis vysokeho textu:
Code:
    10 POKE 23749,244
    20 POKE 23750,9
    30 FOR i=72 TO 79
    40 POKE 23681,i
    50 POKE 23680,9
    60 POKE 23679,0
    70 LPRINT "Hello World !";
    80 NEXT i
Attachment:
lprint128.tap [200 Bytes]
Downloaded 28 times


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group