SORD M5 Creative Computer

 

     

 

SORD Japan logo

 

-- SORD m.5 ------------------------------------------------------------------ Úvod **** Tato prirucka obsahuje informace, ktere je potreba znat pri praci s pocitacem SORD M5. Je zde obsazeno nekolik informaci o systemu ( usporadani pameti, beh systemu, chyby a podobne ), ruzne tabulky, informace o zaznamu dat na magneto- fon a o mikroprocesoru Z80. Pridavne pameti *************** Nize popisovany modul 64KBF je typ pameti 64 KB RAM, ktery v sobe obsahuje oproti stavajici nejrozsirenejsi "sedesatctyrce" take jazyk BASIC-F. Velkou vyhodou tohoto modulu je moznost prace v osmi ruznych rezimech, zatim co 64KBI nabizi pouze rezim 32/48/56 nebo 64 kB RAM + povoleni/zakaz zapisu do dolnich 28 kB RAM, pricemz programove lze ovladat pouze rezim 48/56 kB RAM. V modulu 64KBF je dale oddelen zapis od cteni. Prakticky to znamena, ze mozne ukladat data primo do pameti RAM, ktera je zastinena prave aktivni pameti ROM, oproti modulu 64KBI kde je nutne nejprve ROM odpojit a pak teprve je mozny zapis. Dalsi uvedena pamet 64KRD a 64KRX je vpodstate rozsirujici deska, na ktere je 512KB RAM DISK, 56 nebo 88 KB ROM DISK a 64KB RAM. KRD a KRX se od sebe lisi pouze obsazenim ROM DISKu. Programove ovladani pameti 64KB RAM =================================== EM-64, 64KBI: OUT 6CH,00H - pripoji ROM OUT 6CH,01H - pripoji RAM 64KBF: OUT 30H,00000xxxB - pripoji RAM nebo ROM, viz nize 64KRD, 64KRX: OUT 7FH,00000000B - pripoji RAM OUT 7FH,11111111B - pripoji ROM OUT 7FH,xxxxxxxxB - pripoji RAM i ROM, viz nize Cinnost M5 pri startu systemu ***************************** Po zapnuti nebo po restartu pocitace se spusti od adresy 0000 program ve stro- jovem kodu, ktery je ulozen v tzv. MONITORu ROM. Tento program je zakladnim programovym vybavenim pocitace. Je dlouhy 8kB a nelze jej bez uprav provozovat v pameti RAM, do ktere je povolen zapis. Je to zpusobeno tim, ze MONITOR pro- vadi test RAM, pri kterem nutne musi nastat okamzik, kdy prepise prave prova- denou instrukci, coz zpusobi kolizi, ktera je resena skokem na havarijni stav. Tento problem lze vyresit upravou rutiny testu RAM ( CHKRAM ) na adrese &008E. Vyvojovy diagram: ================= +--------------------------------------+ | RST0 | +--------------------------------------+ | DI | | IM 2 | | SP <- SYSTAK | +--------------------------------------+ | +--------------------------------------+ | M5BOT | +--------------------------------------+ | I <- 70H | | inicializace systemovych | | promennych, CTC | | EI | | inicializace SGC, SML, VDP, | | zobrazeni | +--------------------------------------+ | test MONITOR ROM na soucet 0 | +--------------------------------------+ | | / \ / \ - ****************** < OK? >-------------------* havarijni stav * \ / ****************** \ / + | | +--------------------------------------+ | test RAM, nalezeni zacatku a konce | +--------------------------------------+ | | / \ / \ - ****************** < OK? >-------------------* havarijni stav * \ / ****************** \ / + | | | +---------------------------------------------+ | vyhledani modulu, vyber adres IPL a startu | +---------------------------------------------+ | | / \ je modul? - / \ + +------------------< ? >----------------------------+ | \ / | | \ / +---------------+ | V | skok na IPL | | +---------------+ | | | ***************** | * start modulu * | ***************** | | Format hlavicky modulu | ---------------------- | +-----------+ +0000 +--------------------------------------+ | RBTCMT | | identifikator | +-----------+ +0001 +--------------------------------------+ | precti HD | | startovaci adresa | | z CMT |<--------+ +0003 +--------------------------------------+ +-----------+ | | adresa IPL startu | | | +0005 +--------------------------------------+ | je .VM | | instrukce pro vykonani RST4 | / \ nebo .DT | +0008 +--------------------------------------+ / \ + | | instrukce pro vykonani RST5 | < ? >------------>| +000B +--------------------------------------+ \ / | | vlastni program v modulu | \ / | / / | - | \ \ | | / / +-----------+ | | | | cti telo | | +xFFF +--------------------------------------+ +-----------+ | | | Identifikator modulu | | -------------------- / \ je autostart | 00 = 8 KB od 2000H / \ - | 01 = 8 KB od 4000H < ? >-------------+ 02 = 16 KB od 2000H \ / \ / | + | ************* * skok * * na zaznam * ************* Cinnosti vyvolane prerusenim od CTC #3 - systemovy tvar ******************************************************* +--------------------------------------+ | CTC3SP | +--------------------------------------+ | uschova AF, BC, DE, HL | | falesne RETI | | zaznam STATUS VDP | | test na opravnenost INT | +--------------------------------------+ | | / \ je INT povolen - / \ +---------------< ? > | \ / | \ / | | + | | | | | / \ sprity | / \ + +--------+ | < ON? >-------------------->| SPRPRC |--+ | \ / +--------+ | | \ / | | | - | | +---------------->+<-----------------+ | | | | | / \ | +--------+ + / \ | | hodiny |<---< ON? > | +--------+ \ / | | \ / | novy den / \ | - | +--------+ + / \ | | | EVHPRC |<------< ? > | | +--------+ \ / | | | \ / | | | | - | | +-------------->| | | | | | alarm / \ | | +--------+ + / \ | | | ALMPRC |<------< ? > | | +--------+ \ / | | | \ / | | | | - | | | V | | +--------------------------->| | | | UPCNT / \ | +---------+ + / \ | | UPCNTSP |------< ON? > | +---------+ \ / | | \ / | | | - | +------------->| | | | | | DWCNT / \ | +---------+ + / \ | | DWCNTSP |------< ON? > | +---------+ \ / | | \ / | | | - | +------------->| | | | | ^ | RESET / \ HALT / \ | / \ + / \ + +--------+ | < ON? >------< ? >----->| HLTPRC |---+ | \ / \ / +--------+ | | \ / \ / | | | - | - | | | | | | | RESET / \ | | | / \ + +--------+ | | | < ? >------| RSTPRC |-->| | | \ / +--------+ | | | \ / | | | | - | | |<-----------+<---------------------+ | | | JOY / \ | +---------+ + / \ | | JOYSP |------< ON? > | +---------+ \ / | | \ / | | | - | +------------->| | | | KEY / \ | +---------+ + / \ | | KEYSP |------< ON? > | +---------+ \ / | | \ / | | | - | +------------->| | | | uzivatelske eventy / \ | +---------+ + / \ | | UEVSP |------< ON? > | +---------+ \ / | | \ / | | | - | +------------->| | | | +--------------------+ | | povoleni dalsiho | | | preruseni od CTC 3 | | +--------------------+ | | ------------------------------------>| | +----------------------+ | zpet HL, DE, BC, AF | | navrat do normalniho | | behu | +----------------------+ Usporadani pameti ROM a RAM *************************** Standardni usporadani pameti ROM a RAM v pocitaci a modulech ============================================================ Adresa Obsah KB FFFF +----------------------------+ 64 \ | | 62 | F000 | | 60 | | | 58 | E000 | | 56 | | | 54 | D000 | | 52 | | | 50 | C000 | DRAM v modulu EM-5 | 48 > 32kB | | 46 | B000 | | 44 | | | 42 | A000 | | 40 | | | 38 | 9000 | | 36 | +----------------------------+ | | 34 | | RAM v modulech BG a BF | 8000 |----------------------------| 32 < +----------------------------+ | 4kB RAM v pocitaci | 30 > 4kB 7000 |----------------------------| 28 < <--- 6FFF pro Basic-F | | 26 | 6000 | | 24 | <--- 5FFF pro Basic-G | | 22 | 5000 | ROM jazyku BASIC | 20 | | | 18 > 20kB 4000 | v pridavnych modulech | 16 | <--- 3FFF pro Basic-I | | 14 | 3000 | | 12 | | | 10 | 2000 |----------------------------| 8 < | | 6 | 1000 | Monitor ROM v pocitaci | 4 > 8kB | | 2 | 0000 +----------------------------+ 0 / Usporadani pameti ROM a RAM v sestave SORD M5 + modul 64 KBF ============================================================ Adresa Obsah KB Obsah FFFF +----------------------------+ 64 | | 62 F000 | | 60 | | 58 E000 | | 56 | | 54 D000 | | 52 | | 50 C000 | 32KB RAM | 48 | | 46 B000 | | 44 | | 42 A000 | | 40 | | 38 9000 | | 36 | | 34 8000 |----------------------------| 32 +----------------------------+ | 4KB RAM v pocitaci | 30 | | 7000 |----------------------------| 28 | | | | 26 | | 6000 | | 24 | | | | 22 | | 5000 | | 20 | | | ROM jazyka Basic-F | 18 | | 4000 | | 16 | 32KB RAM | | | 14 | | 3000 | | 12 | | | | 10 | | 2000 |----------------------------| 8 | | | | 6 | | 1000 | Monitor ROM v pocitaci | 4 | | | | 2 | | 0000 +----------------------------+ 0 +----------------------------+ Rezimy prace pocitace M5 v sestave s 64KBF ------------------------------------------ Prepinani rezimu prace ( modu ) se deje pomoci instrukce "OUT &30,mod". MODE READ WRITE ---------------------------------------------------------------------- 00 8 KB MON + 20 KB BF + 36 KB RAM 28 KB DIS + 36 KB RAM 01 64 KB RAM 64 KB RAM 02 8 KB MON + 56 KB RAM 64 KB RAM 03 64 KB RAM 28 KB DIS + 36 KB RAM 04 64 KB RAM 16 KB DIS + 48 KB RAM 05 8 KB MON + 20 KB BF + 36 KB RAM 64 KB RAM 06 8 KB MON + 20 KB DIS + 36 KB RAM 64 KB RAM 07 64 KB DIS 64 KB DIS Usporadani pameti ROM a RAM v sestave SORD M5 + deska 64 KRX ============================================================ na desce v pocitaci v pocitaci na desce na desce FFFF +----------+ +----------+ +----------+ +----------+ +----------+ | | | | | | | | | EPROM 16K| | EPROM 16K| | | | 5 | | 7 | C000 | DRAM | +----------+ +----------+ | | | | | | | | | EPROM 16K| | EPROM 16K| | | | 4 | | 6 | 7FFF +----------+ +----------+ +----------+ +----------+ | SRAM | 7000 +----------+ +----------+ | | 6000 | | +----------+ | | | | 5000 | | | EPROM 8K | | | | 3 | 4000 | | +----------+ +----------+ | | | | 3000 | DRAM | | EPROM 8K | | | | 2 | 2000 | | +----------+ | | | | 1000 | | | EPROM 8K | | | | 1 | 0000 +----------+ +----------+ +----------+ +----------+ +----------+ 1 - MONITOR ROM 2 - WINDOWS + BASIC-F 3. cast 3 - BASIC-I 4 - 2. cast BASIC-F + 1. cast BASIC-F 5 - 1. cast BASIC-G + 2. cast BASIC-G 6 - 1. cast MSX 1.C 7 - 2. cast MSX 1.C Poznamka: na pozici 3 muze byt tez staticka RAM 8KB se zalozni baterii! Po zapnuti jsou pripojeny pameti SRAM + 1,2,3,4,5 nebo SRAM + 1,2,3,6,7. Prepinani mezi 4,5 a 6,7 se deje ISOSTATEM, prepinani ROM/RAM se deje instrukci OUT (7FH),A, kde v A kazdy bit oznacuje 8KB pameti ( stav: 0=RAM, 1=ROM, bit: 0=1, 1=2, 2=3, 3=vzdy SRAM, 4=4, 5=5, 6=6, 7=7 ). Pri behu libovolneho jazyka BASIC: 0000 2000 7000 FFFF +-------------------------------------+ | ROM nebo RAM | RAM | | MONITOR | BASIC-x | volno | +-------------------------------------+ Pri behu MSX 1.C: 0000 8000 FFFF +-------------------+ | RAM | | MSX 1.C | volno | +-------------------+ MONITOR ROM vyuziva oblast RAM 7000-72FF pro sve systemove promenne. Tato RAM musi byt po zapnuti pristupna. Jazyky basic vyuzivaji oblast RAM do 7383 (BI), 745A (BG) a 77F2 (BF). System MSX nuluje 3 byte od 8000 a oblast od F0A0-F37F a F380-FFFF vyuziva pro sve systemove buffery a promenne. Usporadani pameti videoprocesoru ******************************** Usporadani pameti VRAM v rezimu TEXT ==================================== Rozvrzeni plati pro pripad, kdy jsou obe obrazovky v rezimu TEXT. Je-li jedna z nich v rezimu GI viz kapitola 3.2. Adresa Obsah KB 0000 +----------------------------+ 0 \ | | | | | | \ \ | / / | \ Volna pamet 10KB \ > 10240 bytu / / | \ \ | | | | | | | 2800 |----------------------------| 10 < | | | | | | | Generator tvaru znaku | | 2C00 | obrazovky 0 | 11 > 2048 bytu | | | | | | | | | 3000 |----------------------------| 12 < | | | | | | | Generator tvaru znaku | | 3400 | obrazovky 1 | 13 > 2048 bytu | | | | | | | | | 3800 |----------------------------| 14 < | Obsah obrazovky 0 | | | ( ASCII kody znaku ) | > 960 bytu 3BC0 |----------------------------| | | Volna pamet 64 bytu | > 64 bytu 3C00 |----------------------------| 15 < | Obsah obrazovky 1 | | | ( ASCII kody znaku ) | > 960 bytu 3FC0 |----------------------------| | | Volna pamet 64 bytu | > 64 bytu 3FFF +----------------------------+ 16 / Usporadani pameti VRAM v rezimu GI ================================== Rozvrzeni plati pro pripad, kdy jsou obe obrazovky v rezimu GI. Je-li jedna z nich v rezimu TEXT, plati pro oblast obsahu obrazovky to co pro rezim TEXT. Adresa Obsah KB 0000 +----------------------------+ 0 \ | | | | | | \ \ | / / | \ Volna pamet 8KB \ > 8192 bytu / / | \ \ | | | | | | | 2000 |----------------------------| 8 < | | | | | | | Generator tvaru sprajtu | | 2400 | obrazovky 0 i 1 | 9 > 2048 bytu | | | | | | | | | 2800 |----------------------------| 10 < | | | | | | | Generator tvaru znaku | | 2C00 | obrazovky 0 | 11 > 2048 bytu | | | | | | | | | 3000 |----------------------------| 12 < | | | | | | | Generator tvaru znaku | | 3400 | obrazovky 1 | 13 > 2048 bytu | | | | | | | | | 3800 |----------------------------| 14 / \ \ / Viz rozvrzeni VRAM v GI / \ od adresy &3800 \ / / 3FFF |----------------------------| 16 Usporadani pameti VRAM v rezimu GII =================================== Rozvrzeni plati pro pripad, kdy je jedna z obrazovek v rezimu GII. Pro druhou plati pro oblast obsahu obrazovky to co pro rezim ve kterem se nachazi. Adresa Obsah KB 0000 +----------------------------+ 0 \ | Barvy znaku | | 0400 | horni tretina obrazovky | 1 > 2048 bytu | | | 0800 |............................| 2 < | Barvy znaku | | 0C00 | stredni tretina obrazovky | 3 > 2048 bytu | | | 1000 |............................| 4 < | Barvy znaku | | 1400 | dolni tretina obrazovky | 5 > 2048 bytu | | | 1800 |----------------------------| 6 < | | | 1C00 | viz poznamka | 7 > 2048 bytu | | | 2000 |----------------------------| 8 < | Tvary znaku | | 2400 | horni tretina obrazovky | 9 > 2048 bytu | | | 2800 |............................| 10 < | Tvary znaku | | 2C00 | stredni tretina obrazovky | 11 > 2048 bytu | | | 3000 |............................| 12 < | Tvary znaku | | 3400 | dolni tretina obrazovky | 13 > 2048 bytu | | | 3800 |----------------------------| 14 / \ \ / Viz rozvrzeni VRAM v GI / \ od adresy &3800 \ / / 3FFF |----------------------------| 16 Poznamka: --------- &1800 az &1FFF: Generator tvaru spritu pro obrazovku 0 i 1 a zaroven generator tvaru znaku pro opacnou obrazovku ( tzn. pro tu, na niz neni rezim GII ). Tiskne-li se do graficke obrazovky, bere se tvar znaku z tohoto generatoru. Usporadani pameti VRAM od adresy &3800 v rezimu GI ================================================== Rozvrzeni plati pro pripad, kdy jsou obe obrazovky v rezimu GI. Je-li jedna z nich v rezimu TEXT, plati pro oblast od &3800 do &3BFF ( obrazovka 0 ), pripadne &3C00 az &3FFF ( obrazovka 1 ) to co pro rezim TEXT. Je-li jedna z obrazovek v rezimu GII, je pro ni vyuzito jen 768 + 128 bytu a zbytek je volny. Adresa Obsah KB 3800 |----------------------------| 14 \ | | | 3880 | | | | | | 3900 | | | | Obsah obrazovky 0 | | 3980 | ( ASCII kody znaku ) | > 768 bytu | | | 3A00 | | | | | | 3A80 | | | | | | 3B00 |----------------------------| < |Tabulka sprajtu obrazovky 0 | > 128 bytu 3B80 |----------------------------| < | Barvy znaku obrazovky 0 | > 32 bytu 3BA0 |----------------------------| < | Volna pamet 96 bytu | > 96 bytu 3C00 |----------------------------| 15 < | | | 3C80 | | | | | | 3D00 | | | | Obsah obrazovky 1 | | 3D80 | ( ASCII kody znaku ) | > 768 bytu | | | 3E00 | | | | | | 3E80 | | | | | | 3F00 |----------------------------| < |Tabulka sprajtu obrazovky 1 | > 128 bytu 3F80 |----------------------------| < | Barvy znaku obrazovky 1 | > 32 bytu 3FA0 |----------------------------| < | Volna pamet 96 bytu | > 96 bytu 3FFF |----------------------------| 16 / Tabulka barev ************* 00 - 0 - zadna barva ( pruhledna ) - no color ( transparent ) 01 - 1 - cerna - black 02 - 2 - zelena - green 03 - 3 - svetle zelena - light green 04 - 4 - tmave modra - deep blue 05 - 5 - svetle modra - light blue 06 - 6 - tmave cervena - deep red 07 - 7 - fialova - cyan 08 - 8 - cervena - red 09 - 9 - svetle cervena - light red 10 - A - tmave zluta - deep yellow 11 - B - svetle zluta - light yellow 12 - C - tmave zelena - deep green 13 - D - purpurova - ruzova - purple 14 - E - seda - gray 15 - F - bila - white Tabulka klavesnice ****************** Prikaz PRINT PEEK(&702A) vraci hodnoty prerazovacich klaves ( 01 az 08 ) a prikaz PRINT PEEK(&702B) vraci hodnoty znakovych klaves ( 09 az 56 ). ,----.----.----.----.----.----.----.----.----.----.----.----.----.-----. | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | ^ | \ | | | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 41 | 42 | 43 | 44 | 48 |RESET| `----'----'----'----'----'----'----'----'----'----'----'----'----'-----' ,----.----.----.----.----.----.----.----.----.----.----.----.----.--------. |FUNC| Q | W | E | R | T | Y | U | I | O | P | @ | [ | RETURN | | 02 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 49 | 50 | 51 | 52 | 08 | `----'----'----'----'----'----'----'----'----'----'----'----'----'--------' ,----.----.----.----.----.----.----.----.----.----.----.----.----.-------. |CTRL| A | S | D | F | G | H | J | K | L | ; | : | ] | SPACE | | 01 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 53 | 54 | 55 | 56 | 07 | `----'----'----'----'----'----'----'----'----'----'----'----'----'-------' ,--------.----.----.----.----.----.----.----.----.----.----.----.-------. | SHIFT | Z | X | C | V | B | N | M | + | . | / | _ | SHIFT | | 04 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 08 | `--------'----'----'----'----'----'----'----'----'----'----'----'-------' Pripojeni I/O zarizeni ********************** brana ( port ) zarizeni 00 az 03 kanaly CTC #0 az #3 10 a 11 VDP 20 SGC 30 az 37 klavesnice a joystick 40 a 50 centronics pro PRT a univerzalni brana ( MGF, rele, <RESET> ) 60 az 63 rezervovano pro SIO 70 az 73 rezervovano pro PIO 80 az FF volne, originalnim systemem M5 nevyuzivane Porty &60 a &70 byvaji vyuzity pro prepinani ROM/RAM a pro pristup k RAM DISKu. Konktetni pouziti se lisi podle hardwarove konstrukce (nejsou to tovarni vyrobky, jsou to konstrukce fandu SORDa). Dolni polovina ASCII tabulky **************************** 00 00 - znak nic 43 2B + - plus 86 56 V 01 01 A - inverzni A 44 2C , - carka 87 57 W 02 02 B - inverzni B 45 2D - - minus 88 58 X 03 03 C - inverzni C 46 2E . - tecka 89 59 Y 04 04 D - inverzni D 47 2F / - lomitko 90 5A Z 05 05 E - inverzni E 48 30 0 91 5B [ - leva hranata zavorka 06 06 F - inverzni F 49 31 1 92 5C \ - obracene lomitko 07 07 G - inverzni G 50 32 2 93 5D ] - prava hran. zavorka 08 08 H - inverzni H 51 33 3 94 5E ^ - znak mocneni 09 09 I - inverzni I 52 34 4 95 5F _ - podtrzitko 10 0A J - inverzni J 53 35 5 96 60 ` - obraceny apostrof 11 0B K - inverzni K 54 36 6 97 61 a 12 0C L - inverzni L 55 37 7 98 62 b 13 0D M - inverzni M 56 38 8 99 63 c 14 0E N - inverzni N 57 39 9 100 64 d 15 0F O - inverzni O 58 3A : - dvojtecka 101 65 e 16 10 P - inverzni P 59 3B ; - strednik 102 66 f 17 11 Q - inverzni Q 60 3C < - mensi nez 103 67 g 18 12 R - inverzni R 61 3D = - rovnase 104 68 h 19 13 S - inverzni S 62 3E > - vetsi nez 105 69 i 20 14 T - inverzni T 63 3F ? - otaznik 106 6A j 21 15 U - inverzni U 64 40 @ - obchodni at 107 6B k 22 16 V - inverzni V 65 41 A 108 6C l 23 17 W - inverzni W 66 42 B 109 6D m 24 18 X - inverzni X 67 43 C 110 6E n 25 19 Y - inverzni Y 68 44 D 111 6F o 26 1A Z - inverzni Z 69 45 E 112 70 p 27 1B - kursor 70 46 F 113 71 q 28 1C - sipka vpravo 71 47 G 114 72 r 29 1D - sipka vlevo 72 48 H 115 73 s 30 1E - sipka nahoru 73 49 I 116 74 t 31 1F - sipka dolu 74 4A J 117 75 u 32 20 - mezera 75 4B K 118 76 v 33 21 ! - vykricnik 76 4C L 119 77 w 34 22 " - uvozovky 77 4D M 120 78 x 35 23 # - maltezsky kr. 78 4E N 121 79 y 36 24 $ - string, dolar 79 4F O 122 7A z 37 25 % - procenta 80 50 P 123 7B { - leva slozena zavorka 38 26 & - obchodni and 81 51 Q 124 7C | - siroka dvojtecka 39 27 ' - apostrof 82 52 R 125 7D } - prava sl. zavorka 40 28 ( - leva zavorka 83 53 S 126 7E ~ - vlnovka 41 29 ) - prava zavorka 84 54 T 127 7F - trojuhelnicek 42 2A * - hvezdicka 85 55 U 128 80 - plny ctverec 8*8 Narodni abeceda *************** Na ASCII kodech A0h az DFh jsou v M5 znaky narodnich abeced (plna CS abeceda tam neni). Pro mistni potreby vznikl tzv. LZR standard pro usporadani znaku s diakritickymi znamenky a nektere matenaticke symboly. A0: suma B0: prehlasovane O C0: mezera D0: prehlasovane o A1: dlouhe A B1: O s vokanem C1: dlouhe a D1: o s vokanem A2: prehlasovane A B2: R s hackem C2: prehlasovane a D2: r s hackem A3: C s hackem B3: S s hackem C3: c s hackem D3: s s hackem A4: D s hackem B4: T s hackem C4: d s hackem D4: t s hackem A5: dlouhe E B5: dlouhe U C5: dlouhe e D5: dlouhe u A6: E s hackem B6: U s krouzkem C6: e s hackem D6: u s krouzkem A7: prehlasovane E B7: prehlasovane U C7: prehlasovane e D7: prehlasovane u A8: hacek B8: dlouhe R C8: vlnovka D8: dlouhe r A9: dlouhe I B9: dlouhe Y C9: dlouhe i D9: dlouhe y AA: carka BA: Z s hackem CA: prehlaska DA: z s hackem AB: krouzek BB: <= CB: vokan DB: alfa AC: L s hackem BC: stupne CC: l s hackem DC: beta AD: priblizne BD: => CD: odmocnina DD: libra AE: N s hackem BE: nerovna se CE: n s hackem DE: pi AF: dlouhe O BF: plusminus CF: dlouhe o DF: prumer Seznam odezev CTRL + klavesa **************************** kod znak rutina vyznam 00 DSPCH3 neprovede nic 01 A DSPCH3 neprovede nic 02 B STCSD kursor na zacatek radku 03 C SCRDW rolovani dolu 04 D SCRLF rolovani vlevo 05 E SCRUP rolovani nahoru 06 F SCRRG rolovani vpravo 07 G BEL zvonek 08 H DELTC smazani znaku 09 I TABLT tabulace 0A J LFEED dalsi radka 0B K HOHEP kursor home 0C L CLRSC smazani obrazovky ( ne z klavesnice ) 0D M CRETL kursor na zacatek radku a LF 0E N SNTCSD kursor na zacatek dalsi radky 0F O STOVRM psani 10 P STINSM insert 11 Q MMODE MCOLOR 12 R GMODE GII 13 S CMODE GI 14 T TMODE TEXT 15 U NRMSC navrat do stranky 0 16 V REVSC vymena stranky 17 W CRETL jako CTRL M 18 X CANCL smazani do konce radky 19 Y RVDSPP pohled do opacne stranky 1A Z RVWRTP kursor do opacne stranky 1B [ DSPCH3 ESC - neprovede nic 1C ; RGTAW kursor vpravo 1D : LFTAW kursor vlevo 1E @ UPRAW kursor nahoru 1F _ LWRAW kursor dolu CTRL kody na pocitacich rady SMEP ********************************* kod znak vyznam 00 NUL prazdny znak 01 SOH zacatek zahlavi 02 STX zacatek textu 03 ETX konec textu 04 EOT konec prenosu 05 ENQ otazka 06 ACK potvrzeni 07 BEL zvonek 08 BS krok zpet 09 HT horizontalni tabulace 0A LF dalsi radka 0B VT vertikalni tabulace 0C FF nova stranka 0D CR navrat na zacatek radky 0E SO rusky registr 0F SI latinsky registr 10 DLE autoregistr 11 DC1 ridici znak 1 12 DC2 ridici znak 2 13 DC3 ridici znak 3 14 DC4 ridici znak 4 15 NAK neuspesne potvrzeni 16 SYN synchronizace 17 ETB konec bloku 18 CAN zruseni 19 EM konec media 1A SUB substituce 1B ESC autoregistr 2 1C FS oddelovac souboru 1D GS oddelovac skupin 1E RS oddelovac zaznamu 1F US oddelovac prvku 20 SP mezera Zapojeni systemoveho konektoru ****************************** 28 27 26 25 24 05 04 03 02 01 ,--+--+--+--+--+- ... -+--+--+--+--+--. | | | | | | | | | | | | B pohled shora +--+--+--+--+--+- ... -+--+--+--+--+--+ | | | | | | | | | | | | A `--+--+--+--+--+- ... -+--+--+--+--+--' A B A B A B A B 01:-12V -12V 10: D1 D6 19: A0 A15 28: RST CLK 02:+12V +12V 11: D0 D7 20: WAIT MRQ 03:+12V +12V 12: A7 A8 21:ROMDS RFSH 04: +5V +5V 13: A6 A9 22: ROM0 ROM1 05: +5V +5V 14: A5 A10 23: ROM2 EXM 06: GND GND 15: A4 A11 24: MRD MWR 07: GND GND 16: A3 A12 25: IORD IOWR 08: D3 D4 17: A2 A13 26:EXIOA EXIOB 09: D2 D5 18: A1 A14 27:EXINT EXCLK Zapojeni konektoru tiskarny *************************** 15 13 11 9 7 5 3 1 ,---+---+---+---+---+---+---+---. | NC|GND| NC| D6| D4| D2| D0|STB| +---+---+---+---+---+---+---+---+ pohled zezadu | NC|GND|BUS| D7| D5| D3| D1|GND| `---+---+---+---+---+---+---+---' 16 14 12 10 8 6 4 2 Zapojeni joysticku ****************** konektor ,---------------------------------------------*------O 2 (+) 1 o o 6 | ,-----------------------------------------|------O 3 4 o o 5 | | ,------------------------------------|------O 4 3 o/\o 2 | | | ,--------------------------*----|------O 5 v pocitaci | | | | | | up left down right <- tlacitka smeru ATA ATB <- tlacitka attack | | | | | | <- zde jsou zapojeny diody `---*----*----*--------------------------|----|------O 6 `----*------O 1 (-) Cteni klavesnice a joysticku **************************** 7 6 5 4 3 2 1 0 bit/brana ,-------+-------+-------+-------+-------+-------+-------+-------. | ENTER | SPACE | --- | --- |P.SHIFT|L.SHIFT| FUNC | CTRL | 30 +-------+-------+-------+-------+-------+-------+-------+-------+ | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 31 +-------+-------+-------+-------+-------+-------+-------+-------+ | I | U | Y | T | R | E | W | Q | 32 +-------+-------+-------+-------+-------+-------+-------+-------+ | K | J | H | G | F | D | S | A | 33 +-------+-------+-------+-------+-------+-------+-------+-------+ | , | M | N | B | V | C | X | Z | 34 +-------+-------+-------+-------+-------+-------+-------+-------+ | \ | _ | / | . | ^ | - | 0 | 9 | 35 +-------+-------+-------+-------+-------+-------+-------+-------+ | ] | : | ; | L | [ | @ | P | O | 36 +-------+-------+-------+-------+-------+-------+-------+-------+ | P.JOY | P.JOY | P.JOY | P.JOY | L.JOY | L.JOY | L.JOY | L.JOY | 37 | | | <-- | ^ | --> | | | <-- | ^ | --> | | v | | | | | v | | | | | `-------+-------+-------+-------+-------+-------+-------+-------' Spoustece joy ( fire, attack ) jsou napojeny na klavesy 1, 2, 5 a 6. Univerzalni brana 50H ********************* +----------+--------------------+-------------------------------+ | bit | vstup | vystup | | 76543210 +--------------------+-------------------------------+ | 00000001 | vstup OLD z MGF | SAVE na MGF a DSTB na PRT | | 00000010 | BUSY od PRT | STS na PRT a na civku rele | | 00000100 | COM pro PRT | --- | | 10000000 | klavesa <RESET> | --- | +----------+--------------------+-------------------------------+ Format zaznamu dat na magnetofonu ********************************* +--------------------------------------------------- . . . ---------------+ | bez signalu | uvodni pisk | blok | IBG | blok | | IBG | blok | | 4 sec | 8000 kmitu | HD | pisk | dat | | pisk | EOF | +--------------------------------------------------- . . . ---------------+ Blok HD Blok dat ======= ======== +----------------------------------+ +----------------------------------+ | IDENT | pocet | DATA | kontrolni | | IDENT | pocet | DATA | kontrolni | | | bytu | HD | soucet | | | bytu | | soucet | +----------------------------------+ +----------------------------------+ Format bloku HD ( IDT - hlavicka ) ================================== 00 +--------------------------------------+ Tvar atributu | atribut | ~~~~~~~~~~~~~ 01 +--------------------------------------+ 0 1 | jmeno zaznamu | 0 data BASIC program .CM | maximalne 9 znaku | 1 jen nahravat autostart | jinak ukonceno 00 | 2 souvisla data file .DT 0A +--------------------------------------+ 3 CPU VRAM | nahravaci adresa | 4 bez roz. atr. s roz. atr. 0C +--------------------------------------+ 5 \ | delka dat | 6 > typ dat 0E +--------------------------------------+ 7 / | startovaci adresa | 10 +--------------------------------------+ Typ dat | rozsirujici atribut | ~~~~~~~ 11 +--------------------------------------+ | | 20 BI | nepouzity prostor | 40 FC | | 60 BG 1F +--------------------------------------+ 80 BF Format bytu =========== start bit = 0, stop bit = 1, priklad pro E5h * 0 * 1 * 1 * 1 * 0 * 0 * 1 * 0 * 1 * 1 +----+ +--+ +--+ +--+ +----+ +----+ +--+ +----+ +--+ +--+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + +----+ +--+ +--+ +--+ +----+ +----+ +--+ +----+ +--+ +--+ start bit stop bit IBG - pisk pred zaznamem o delce 512 nebo 3600 pulsu u nesouvislych dat IDENT - byt identifikace 'H' - HD 'D' - DATA 'F' - FILE 'E' - EOF Urceni delky IBG pisku ====================== pri CALL je hodnota v C IBG = C*256+C [ pulsu ] Seznam chyb, ktere generuje MONITOR ROM *************************************** navesti kod typ odkud - 7C 3B nepouzita od uzivatele .OVIEW 7D 3C mimo VIEW MVACS, RDSCH .CATRG 7E 3D pretekl rozsah GTSTEP .SPRDA 7F 3E sprite mimo obrazovku MVSPA, MVSPR, GTSPRC .ACMIU 80 3F nepouzita .CHKSM 81 40 chyba kontrol. souctu BLOAD, RFIDC, LOADC .BREAK 82 41 stisk RESET BSAVE, BLOAD, RFIDC, LOADC .FINUM 83 42 rozdilne jmeno RFIDC, BLOAD .BUFFL 84 43 pretekl buffer RDSTM,FUNC,EDTLN,ACELN,PTKDT,LOADC .DADOT 85 44 nal. EOF, nejsou data BLODD, GTKDT, LOADC .ILGDM 86 45 jiny rezim displeje STICOL .TIMOT 87 46 pretekl cas ACECH, WTKDTC, EDTLN, ACELN .SPRPOS 88 47 sprit mimo rozsah MVSPA, GTSPOS, MVSPR, GTSPPC .ILGCM 89 48 chybny parametr VIEW,STCHR,RDCHR,PLAY,ETREIT,GTSTEP .SPNFD 8A 49 chyba sprite GTSPLC .EVNRD 8B 4A nedovolena operace STRTDC, STRTUC .ILGEL 8C 4B jiny blok BLOAD, LOADC - 8D 4C nepouzita Vyznam: Programy v MONITORU volaji jednotlive rutiny, ve kterych je, v pripade, ze nastane chyba, volana rutina obslouzeni chyb, ktera zajisti vypnuti motoru, povoleni preruseni, zahozeni navratove adresy ( na to pozor! ) a predani cisla chyby do akumulatoru. V rutine, kde nastala chyba se tedy jiz nepokracuje, rizeni je predano do podprogramu, ktery vyhodnoti podle stavu CY, jak dal pokracovat. Strucny popis vybranych casti z problematiky programovani na Z80 **************************************************************** Registry ======== AF, BC, DE, HL, IX a IY jsou registrove pary AF', BC', DE' a HL' jsou zrcadlove registrove pary registrove pary AF, BC, DE a HL jsou slozeny ze dvou registru ( registrovy par AF z registru A a z registru F ... atd ) R je Refresh registr I je Interrupt registr Jednotlive bity v registru F znamenaji: S - sign: vysledek operace < 0 Z - zero: vysledek operace = 0 H - half: pro DAA pri prenosu uvnitr cisla P/V - parity/overflow pro logicke/vypocetni operace N - substract: kdyz posledni operace bylo odecitani C - carry: prenos pri vypoctu ( oznacovan take CY ) Zapis podminky ============== Obecna podminka "if NN {operator} QQ then RET" se resi nejjednoduseji: IFTHEN: LD A,NN CP QQ ;if NN ?? QQ then RET ;a nyni v konkretnim pripade nasleduje jedna z moznosti RET Z ;if NN = QQ then RET RET NZ ;if NN <> QQ then RET RET C ;if NN < QQ then RET RET NC ;if NN => QQ then RET ;kde NN a QQ jsou jednobajtova cisla ( nebo pripadne obsahy registru ). Obecne tedy plati - - a kontroluje se : IF NN = QQ THEN Z=1, CY=0 ELSE Z=0, CY=X ; >> Z << IF NN <> QQ THEN Z=0, CY=X ELSE Z=1, CY=0 ; >> NZ << IF NN < QQ THEN Z=0, CY=1 ELSE Z=X, CY=0 ; >> C << IF NN => QQ THEN Z=X, CY=0 ELSE Z=0, CY=1 ; >> NC << ( poznamka: X znamena stav v zavislosti na velikosti QQ a NN ) Podobne se testuje obsah jednoho bitu: IF BIT=1 THEN Z=0 ELSE Z=1 ; >> NZ << a opacne: IF BIT=0 THEN Z=1 ELSE Z=0 ; >> Z << napriklad: TSTBIT: LD HL,FLAG BIT 2,(HL) ;Vrat se, jestlize je druhy bit RET NZ ;promenne FLAG nastaven na 1 ... Relacni operace =============== Relacni operace se zapisuji ( napriklad ) nasledovne ( vysledek je ulozen v registru A ): LD A,#05 ;Vysledky: #05 - 0000 0101 ; #06 - 0000 0110 ; --------------- AND A,#06 ; #05 AND #06 = #04 - 0000 0100 OR A,#06 ; #05 OR #06 = #07 - 0000 0111 XOR A,#06 ; #05 XOR #06 = #03 - 0000 0011 NEG ; = #FB - 1111 1011 Vsechny relacni operace nastavuji CY=0. Chceme-li zjistit, je-li v registru A nula, pouzijeme instrukci OR A. Zero pak vraci vysledek ( je/neni ). Aritmeticke operace =================== Naprikld: ADC A,NN ; A:=A+NN+CY ADD A,NN ; A:=A+NN SBC A,NN ; A:=A-NN-CY SUB A,NN ; A:=A-NN DEC A ; A:=A-1 INC A ; A:=A+1 DAA ; Prevod HEX --> BCD Rotace jednobajtove hodnoty =========================== Rotace znamena vlastne pouhe presunuti jednotlivych bitu v jednom bajtu danym smerem ( vlevo, vpravo ), pricemz bit, ktery je z bajtu "vysunut ven" je vzdy prekopirovan do CY a pripadne jeste do bitu na opacnem konci bajtu. Instrukce RL ( rotate left ) a RLC ( rotate left carry ) se provadeji nasledovne: 7 6 5 4 3 2 1 0 CY 7 6 5 4 3 2 1 0 CY .-.-.-.-.-.-.-.-. .-. .-.-.-.-.-.-.-.-. .-. .-- |1|0|0|1|0|1|1|0| <-- |1| <--. .-- |0|0|0|1|0|1|1|1| <--. |1| <--. | `-`-`-`-`-`-`-`-' `-' | | `-`-`-`-`-`-`-`-' | `-' | `---------------->---------------' `---------------->-------+--------' RL - pred presunem "10010110 1" a po presunu "00101101 1". RLC - pred presunem "00010111 1" a po presunu "00101110 0". ; 76543210 CY Presun bitu o jeden - ; ABCDEFGH X RL A ; BCDEFGHX A - vlevo pres CY RLC A ; BCDEFGHA A - vlevo, sedmy do CY RR A ; XABCDEFG H - vpravo pres CY RRC A ; HABCDEFG H - vpravo, nulty do CY SLA A ; BCDEFGH0 A - vlevo, do nulteho 0, sedmy do CY SLIA A ; BCDEFGH1 A - vlevo, do nulteho 1, sedmy do CY SRA A ; AABCDEFG H - vpravo, sedmy zachovan SRL A ; 0ABCDEFG H - vpravo, do sedmeho 0, nulty do CY Programovani obvodu TMS9929A - videoprocesor ******************************************** VDP data port ( I/O port 10H ) ============================== Brana pro zapis nebo cteni jednoho bajtu do nebo z VRAM na nebo z predem nas- tavene adresy. Po cteni nebo zapisu se adresa automaticky o jednu zvetsi. VDP command port ( I/O port 11H ) ================================= Bity po precteni: 7 - 1 = paprsek dobehl na konec obrazovky 6 - 1 = nastal stret dvou a vice spritu 5 - 1 = na jedne TV radce se nachazi pet a vice spritu 4 az 0 - cislo spritu, ktery je paty na TV radce Bity pro zapis: Je-li nastaven bit 7, pak bity 2 az 0 obsahuji cislo registru VDP, do ktereho ma byt proveden zapis. Je-li shozen bit 7, pak bity 5 az 0 obsahuji adresu VRAM, na kterou se ma VDP nastavit, pricemz bit 6 urcuje, ma-li se VDP nasta- vit pro cteni nebo zapis - 0 = cteni, 1 = zapis. Pozor! Nejdrive se vysilaji data nebo dolni polovina adresy ( bity 7 az 0 nemaji zadny specialni vyznam ) a teprve pote se vysila cislo registru nebo horni polovina adresy ( bity 7 a 6 maji vyse uvedeny vyznam ). Vyznam registru VDP: 7 6 5 4 3 2 1 0 bit/registr ,-------+-------+-------+-------+-------+-------+-------+-------. | 0 | 0 | 0 | 0 | 0 | 0 | M3 | EXTVI | R0 +-------+-------+-------+-------+-------+-------+-------+-------+ | VRAM | BLANK | INTEN | M1 | M2 | 0 | SIZE | MAG | R1 +-------+-------+-------+-------+-------+-------+-------+-------+ | 0 | 0 | 0 | 0 | adresa obrazovky | R2 +-------+-------+-------+-------+-------+-------+-------+-------+ | adresa tabulky barev | R3 +-------+-------+-------+-------+-------+-------+-------+-------+ | 0 | 0 | 0 | 0 | 0 | adresa predloh znaku | R4 +-------+-------+-------+-------+-------+-------+-------+-------+ | 0 | adresa tabulky spritu | R5 +-------+-------+-------+-------+-------+-------+-------+-------+ | 0 | 0 | 0 | 0 | 0 | adresa predloh spritu | R6 +-------+-------+-------+-------+-------+-------+-------+-------+ | barva popredi | barva pozadi nebo ramecku | R7 `-------+-------+-------+-------+-------+-------+-------+-------' Vyznam bitu: EXTVI - 0 = zakazani externiho videosignalu VRAM - vyber pameti pouzitych pro VRAM: 0 = 4027 ; 1 = 4108 / 4116 BLANK - 0 = nezobrazuji se tvary, pouze barva pozadi INTEN - 0 = zakaz generovani prerusovaciho signalu SIZE - 0 = 8*8, 1 = 16*16 MAG - 0 = nezvetseno, 1 = dvakrat zvetseno M1 M2 M3 - nastaveni rezimu 0 0 0 GI 0 0 1 GII 0 1 0 MCOL 1 0 0 TEXT High Low registr R2=adresa/400H - 00xx xx00 0000 0000 -> 0000 0000 0000 xxxx R3=adresa/40H - 00xx xxxx xx00 0000 -> 0000 0000 xxxx xxxx R4=adresa/800H - 00xx x000 0000 0000 -> 0000 0000 0000 0xxx R5=adresa/80H - 00xx xxx0 0000 0000 -> 0000 0000 000x xxxx R6=adresa/800H - 00xx x000 0000 0000 -> 0000 0000 0000 0xxx Programovani obvodu SN76489AN - zvukovy generator ************************************************* SGC data port ( I/O port 20H ) ============================== SGC obsahuje tri zvukove generatory. Kanaly 0 az 2 jsou tonove, kanal je 3 su- movy. Bity pro zapis - prvni byte: Je-li nastaven bit 7, pak bity 6 a 5 vzdy urcuji cislo kanalu SGC, do ktereho je provaden zapis. Bit 4 urcuje, jestli se nastavuje frekvence =0, nebo zesla- beni =1. Bity 3 az 0 pak obsahuji bud velikost zeslabeni nebo v pripade zapisu do kanalu 0 az 2 obsahuji dolni polovinu frekvence. U kanalu 3 urcuje bit 2 periodicky sum =0 nebo bily sum =1 a bity 1 a 0 urcuji jeho frekvenci. - druhy byte: Je-li shozen bit 7, pak bity 5 az 0 obsahuji horni polovinu frekvence. Programovani SGC: 1. byte 2.byte 1000nnnn 0Xnnnnnn - nastaveni kanalu 0 na frekvenci n 1010nnnn 0Xnnnnnn - nastaveni kanalu 1 na frekvenci n 1100nnnn 0Xnnnnnn - nastaveni kanalu 2 na frekvenci n 1110Xp00 - nastaveni sumoveho kanalu na frekvenci F0/512 1110Xp01 - nastaveni sumoveho kanalu na frekvenci F0/1024 1110Xp10 - nastaveni sumoveho kanalu na frekvenci F0/2048 1110Xp11 - nastaveni sumoveho kanalu stejnou frekvenci, jakou ma kanal 2 1kk1zzzz - nastaveni zeslabeni kanalu k. Velikost zeslabeni: 0000 - 0 dB 0001 - 2 dB 0010 - 4 dB 0100 - 7 dB 1000 - 12.5 dB 1111 - umlceni kanalu Programovani obvodu Z80 CTC - citac *********************************** ridici slovo: .----+----+----+----+----+----+----+----. | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | `----+----+----+----+----+----+----+----' D0: =0 V byte select ( channel 0 ) only =1 P byte select Format V bytu: .----+----+----+----+----+----+----+----. | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | `----+----+----+----+----+----+----+----' \_______ _______/ V interrupt vector - dolni byte vektoru preruseni D1,D2: channel number, 0 - 0 0 - cislo kanalu 1 - 0 1 2 - 1 0 3 - 1 1 Format P bytu: .----+----+----+----+----+----+----+----. | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | `----+----+----+----+----+----+----+----' D7: =0 interrupt disable - zakaz prerusovani CPU =1 interrupt enable - povoleno prerusovani CPU D6: =0 counter - CTC kanal funguje jako citac =1 timer - CTC kanal funguje jako casovac D5: =0 sytstem clock division by 256 - hodiny delene 256 ( timer mode ) =0 sytstem clock division by 16 - hodiny delene 16 D4: =0 clock - kanal pobezi podle hodin =1 trigger - kanal bude spousten D3: =0 external trigger - kanal bude spousten zvenci ( timer mode ) =1 auto trigger - kanal bude spousten automaticky D2: =0 no will TC - nenasleduje TC byte =1 load TC - nasleduje TC byte D1: =0 stop - zastaveni kanalu =1 cont - spusteni kanalu - pokracovani Format TC bytu: .----+----+----+----+----+----+----+----. | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | `----+----+----+----+----+----+----+----' D7-D0: data 00 az FFh pro timer counter Programovani obvodu I8255 - paralelni port ****************************************** Obvod I8255 je obsazen v modulu PI-5 PIO. OUT &70,data nebo INP(&70) - zapis/cteni - brana A OUT &71,data nebo INP(&71) - zapis/cteni - brana B OUT &72,data nebo INP(&72) - zapis/cteni - brana C OUT &73,CWR - ridici slovo CWR: ==== volba druhu provozu ------------------- bit 0 - C3-C0, 1=IN, 0=OUT 1 - B7-B0, 1=IN, 0=OUT 2 - druh provozu pro C3-C0 a B7-B0, 0=0, 1=1 3 - C7-C4, 1=IN, 0=OUT 4 - A7-A0, 1=IN, 0=OUT 5,6 - druh provozu pro C7-C4 a A7-A0, 00=0, 01=1, 1X=2 7 - 1 ( probiha volba provozu ) setovani/resetovani bitu ------------------------ bit 0 - 0=bit resetovat, 1=bit nasetovat 0 1 2 3 4 5 6 7 - cislo bitu se kterym se pracuje 1 - 0 1 0 1 0 1 0 1 - B0 2 - 1 1 0 0 1 1 0 0 - B1 3 - 0 0 0 0 1 1 1 1 - B2 4,5,6 - bez vyznamu 7 - 0 ( probiha setovani/resetovani bitu ) druh provozu 0 -------------- +---------+---+---+---+---+ | 4 3 1 0 | A | Ch| B | Cl| +---------+---+---+---+---+ | 0 0 0 0 | O | O | O | O | | 0 0 0 1 | O | O | O | I | | 0 0 1 0 | O | O | I | O | | 0 0 1 1 | O | O | I | I | | 0 1 0 0 | O | I | O | O | | 0 1 0 1 | O | I | O | I | | 0 1 1 0 | O | I | I | O | | 0 1 1 1 | O | I | I | I | | 1 0 0 0 | I | O | O | O | | 1 0 0 1 | I | O | O | I | | 1 0 1 0 | I | O | I | O | | 1 0 1 1 | I | O | I | I | | 1 1 0 0 | I | I | O | O | | 1 1 0 1 | I | I | O | I | | 1 1 1 0 | I | I | I | O | | 1 1 1 1 | I | I | I | I | +---------+---+---+---+---+ Definovani novych zarizeni v Basiku-F ************************************* Zacatek tabulky zarizeni v BF: 609D DB IDENT DW ADRDAL DS 3 DW OPEN,CLOSE,PRINT,PUT,INPUT,GET,RECORD,FIND . . . ADRDAL DB IDENT . . . IDENT - Bitove: 0 ... 0 = platne zarizeni 1 = neplatne zarizeni 1 ... 0 = neni "FX:"; 1 = je "FX:" 2 ... 0 = 1 = 3 ... 0 = CLOSE pred novym OPEN; 1 = mozno opakovat OPEN 4 ... 0 = neni "FX:"; 1 = driver "FX:" ???? 5 ... 0 = 1 = 6 ... 0 = neni "FX:"; 1 = vysle se volba kanalu 7 ... 0 = zarizeni pristupne; 1 = zarizeni se ignoruje posledni zarizeni vede do RAM. 73CE DB IDENT / 80h - ignorovani / DW ADRDAL / 0000h - neni / konec tabulky, zde se zadava adresa tabulky noveho zarizeni, tabulka na 73CE je jen odrazem do RAM OPEN "DEV:NAME" [ FOR { INPUT / OUTPUT / APPEND } ] AS #CHANNEL ( #0 je otevren automaticky pro "CNS:", proto pred jeho pouzitim je treba provest CLOSE #0 ) 7369 ;tabulka 16-ti kanalu, ktere mohou byt soucasne OPEN DB typ zarizeni ( 0FFh = kanal uzavren, t.j. volny ) DB cislo driveru DB cislo FX kanalu DW adresa definice zarizeni DB poloha tisku Tyto bajty naplni spravne zavolani prikazu OPEN. Pokud chceme nekterou funkci v definici zarizeni ignorovat, uvedeme adresu 5EE5h . OPEN: ----- vstup: A,D,BC A D IX - bazova adresa kanalu (IX+2) je k dispozici ----- 09 53 neni FOR BC - delka RECORDu ( implicitne 256 ) 04 22 FOR INPUT 0A 31 FOR OUTPUT 0A 37 FOR APPEND Dalsi rutiny nekontroluji, jestli smeji byt vzhledem k FOR pouzity. PRINT, PUT, INPUT, GET: ----------------------- vstup: HL,B,E,SYSFMT,DIFLGA,IX HL - adresa odkud pripadne kam B - maximalni delka pripadne pocet E - (IX+2) z tabulky kanalu SYSFMT bit: 0 - VRAM/RAM, 1 - VERIFY/OLD DIFLGA bit: 1 - zobraz/vykonej CTRL kody vystup: HL,B,A HL - adresa za poslednim zpracovanym kodem B - pocet nezpracovanych znaku A - posledni zpracovany kod U PRINT a INPUT: zakoncit na kod 00 ( nezaznamenava se ) nebo ma 0Dh ( jeste zaznamenat ). RECORD: ------- vstup: BC,E,IX BC - cislo za RECORDem E - (IX+2) z tabulky kanalu ma vyznam jen pro "FX:" pro formatovani diskety CLOSE: ------ vstup: E,IX E - (IX+2) z tabulky kanalu zapise 0FFh do tabulky kanalu FIND: ----- reaguje na oddelovace v PRINT ( tabulace a pod. ). Neni pouzito z vnejsku, zjisti tiskovou pozici Ve vsech rutinach je vystupnim parametrem CY, signalizuje chybu, kod chyby ocekava Basic-F v registru A a uzavira s ni VSECHNY kanaly. SAVE = OPEN + PUT + CLOSE VSAVE = SET 0,(SYSFMT) + SAVE OLD = OPEN + GET + CLOSE Cisla a adresy prikazu a funkci jazyka Basic-F a Basic-D ******************************************************** jmeno kod BD BF navesti err-2 00 79B5 2762 .ERRS REM 01 49BF 49BF .REMN ! or ' 02 49BF 49BF .REM! err-2 03 79B5 2762 .ERRS DATA 04 49BF 49BF .DATA $ 05 4353 4353 .LABL err-2 06 79B5 2762 .ERRS err-2 07 79B5 2762 .ERRS err-2 08 79B5 2762 .ERRS err-2 09 79B5 2762 .ERRS AUTO 0A 435A 435A .AUTO CLEAR 0B 438C 438C .CLEA CLIST 0C 7BD2 441E .CLST CONT 0D 43E2 43E2 .CONT DEL 0E 4401 4401 .DEL KILL 0F 5D89 5D89 .KILL LIST 10 7BCF 441B .LIST NEW 11 44CA 44CA .NEW OLD 12 7B9A 4726 .OLD RENUM 13 4506 4506 .RENM RUN 14 7B2C 45A5 .RUN SAVE 15 4645 4645 .SAVE STEP 16 45FB 45FB .STEP TAPE 17 4614 4614 .TAPE TRACE 18 45FE 45FE .TRCE TYPE 19 4626 4626 .TYPE VERIFY 1A 7B86 4717 .VRFY VSAVE 1B 7B37 46BA .VSAV CHAIN 1C 473D 473D .CAIN CLOSE 1D 5079 5079 .CLSE CONSOLE 1E 5025 5025 .CONS DIM 1F 4938 4938 .DIM END 20 4A09 4A09 .END FOR 21 4A22 4A22 .FOR GET 22 5152 5152 .GET GOSUB 23 4B9C 4B9C .GSUB GOTO 24 4BA9 4BA9 .GOTO IF 25 4BC8 4BC8 .IF INPUT 26 4DA6 4DA6 .INPT LEN 27 5071 5071 .LEN LET 28 4C19 4C19 .LET (LET) 29 4C19 4C19 .LETN NEXT 2A 4B05 4B05 .NEXT ON 2B 7CF2 4C6E .ON OPEN 2C 5096 5096 .OPEN PRINT 2D 4CE2 4CE2 .PRNT PUT 2E 5120 5120 .PUT RANDOMIZE 2F 3F4B 3F4B .RAND READ 30 4E0B 4E0B .READ RECORD 31 517B 517B .RCRD REPEAT 32 4F82 4F82 .RPAT RESTORE 33 4F70 4F70 .RSTR RETURN 34 4F01 4F01 .RSME RETURN 35 4F13 4F13 .RETN STOP 36 4FB0 4FB0 .STOP SWAP 37 4FD9 4FD9 .SWAP THETA 38 5862 5862 .THTA UNTIL 39 4F8F 4F8F .UNTL BCOL 3A 5205 5205 .BCOL CLS 3B 51A1 51A1 .CLS COLOR 3C 520E 520E .CLOR DRAW 3D 5319 5319 .DRAW FCOL 3E 51F9 51F9 .FCOL GINIT 3F 804D 6287 .GNIT GMODE 40 52EC 52EC .GMDE GMOVE 41 530B 530B .GMVE LOC 42 5246 5246 .LOC LOCATE 43 51CA 51CA .LCTE MAG 44 51EA 51EA .MAG PAINT 45 5342 5342 .PAIN PLOT 46 5311 5311 .PLOT SCOD 47 51D0 51D0 .SCOD SCOL 48 51D5 51D5 .SCOL STCHR 49 5288 5288 .STCH VIEW 4A 51AB 51AB .VIEW CALL 4B 56B8 56B8 .CALL EVENT 4C 7D20 56D1 .EVNT EXE 4D 5804 5804 .EXE FX 4E 6D14 6D14 .FX GCOPY 4F 536B 536B .GCPY OUT 50 5796 5796 .OUT POKE 51 57A4 57A4 .POKE POKEW 52 5904 5904 .PKEW SG 53 5708 5708 .SG SLEEP 54 5750 5750 .SLEP VPOKE 55 57B2 57B2 .VPKE WAIT 56 5785 5785 .WAIT NOLIST 57 44ED 44ED .NLST DEF 58 7D5A .DEF WHILE 59 7E1F .WHLE WEND 5A 7E61 .WEND PUSH 5B 7D99 .PUSH POP 5C 7DDD .POP BAR 5D 7FFC .BAR BOX 5E 8001 .BOX CIRCLE 5F 800C .CRCL JOINT 60 7F69 .JONT MOVE 61 7F93 .MOVE ERASE 62 7F53 .ERAS ESCRN 63 7EB4 .ESCR MPRINT 64 7F18 .MPRT PLAY 65 80BD .PLAY PMODE 66 80EF .PMDE TIME$ 67 8162 .TIM$ ALARM$ 68 8159 .ALM$ ALARM 69 7D35 .ALRM COINC 6A 7D03 .CONC ERROR 6B 8152 .ERRO KEY 6C 7D0A .KEY LINE 6D 7E72 .LINE OUTW 6E 819C .OUTW FILES 6F 81AE .FILS err-2 70 79B5 2762 .ERRS err-2 00 79B5 2762 .ERRS ABS 01 537F 537F .ABS ATN 02 5379 5379 .ATN CDBL 03 53FA 53FA .CDBL CINT 04 5400 5400 .CINT COS 05 3C0E 3C0E .COS EXP 06 3A7B 3A7B .EXP FIX 07 3849 3849 .FIX INT 08 3853 3853 .INT LN 09 38C0 38C0 .LN LOG 0A 379D 379D .LOG PI 0B 5389 5389 .PI RND 0C 538F 538F .RND SGN 0D 53C0 53C0 .SGN SIN 0E 3C15 3C15 .SIN SQR 0F 39DE 39DE .SQR TAN 10 3D17 3D17 .TAN XCHG 11 53DD 53DD .XCHG ASCII 12 5425 5425 .ASCI CHR$ 13 5505 5505 .CHR$ HEX$ 14 5513 5513 .HEX$ INSTR 15 5434 5434 .INST LEFT$ 16 5494 5494 .LET$ LEN 17 54FD 54FD .LEN MID$ 18 54B6 54B6 .MID$ NUM$ 19 83A2 5556 .NUM$ RDST$ 1A 567E 567E .RDS$ RIGHT$ 1B 54A2 54A2 .RGH$ RPT$ 1C 5524 5524 .RPT$ VAL 1D 565B 565B .VAL CALC 1E 57C3 57C3 .CALC ERR 1F 584E 584E .ERR ERRL 20 5855 5855 .ERRL ERRL$ 21 585B 585B .ERR$ FRE 22 5869 5869 .FRE INKEY$ 23 58BA 58BA .INK$ INP 24 58E9 58E9 .INP PEEK 25 58F2 58F2 .PEEK PEEKW 26 5919 5919 .PEKW REG 27 53E5 53E5 .REG TIME 28 58CD 58CD .TIME VARPTR 29 58D3 58D3 .VPTR VPEEK 2A 58F9 58F9 .VPEK POS 2B 8403 .POS RCRT 2C 8423 .RCRT MRCRT$ 2D 872A .MRC$ RDCHR$ 2E 86F8 .RDC$ COLOR 2F 83DA .COLR DIST 30 85F4 .DIST DRCT 31 85D8 .DRCT POINT 32 8431 .PONT COINC 33 8449 .CINC LINK 34 8694 .LINK POST 35 86C9 .POST SPRITE 36 866B .SPRT STATUS 37 86BB .STTS INKEY 38 873F .INKE PLAY 39 8754 .PLAY TIME$ 3A 87E4 .TME$ ASW 3B 87B6 .ASW ICOS 3C 8792 .ICOS INPW 3D 8814 .INPW ISIN 3E 878D .ISIN JOY 3F 87CB .JOY Oddelovace a ostatni urcujici slova jazyka Basic-F a Basic-D ************************************************************ kod slovo 80 PROMENNA% B0 OR E0 ALARM 81 B1 XOR E1 KEY 82 PROMENNA# B2 E2 83 B3 E3 84 PROMENNA$ B4 E4 85 B5 E5 86 B6 E6 87 B7 E7 88 KONSTANTA% B8 E8 89 B9 E9 8A KONSTANTA# BA EA 8B BB EB 8C KONSTANTA$ BC EC 8D BD ( ED 8E BE ) EE 8F KONSTANTA& BF NOT EF 90 FN.% C0 cislo radku F0 91 C1 adresa radku F1 92 FN.# C2 navesti F2 93 C3 F3 94 FN.$ C4 TAB F4 95 C5 CURSOR F5 96 C6 F6 97 C7 F7 98 C8 ON F8 99 C9 OFF F9 9A CA TO FA 9B CB IN FB 9C CC # FC ELSE 9D CD @ FD THEN 9E CE , FE : 9F CF ; FF <CR> A0 D0 STEP A1 ^ D1 RECORD A2 * D2 MODE A3 / D3 DBL A4 D4 STR A5 MOD D5 GOSUB A6 + D6 GOTO A7 - D7 RESTORE A8 = D8 ERROR A9 D9 EVENT AA < DA FOR AB <= DB AS AC > DC INPUT AD >= DD OUTPUT AE <> DE APPEND AF AND DF ALL Ulozeni basickych promennych **************************** a) ciselne promenne - jednoducha promenna: ATR + JMENO + HODNOTA - promenna typu pole: ATR + JMENO + DELKA + DIM + SEZNAMDIM + HODNOTA b) retezcove promenne - jednoducha promenna: ATR + JMENO + LENM + TEXT - promenna typu pole: ATR + JMENO + DELKA + DIM + SEZNAMDIM + LENM + TEXT vysvetlivky: ============ ATR - 1 byte, vyznam: ---------------------------------------------+ bit | 0 | 1 | 2 | 3 | 4 5 6 7 | ----+-----+-----+-----+-----+----------------+ 0 | INT | - | - | - | bez vyznamu | 1 | - | DBL | STR | pole| | ----+-----+-----+-----+-----+----------------+ JMENO - 1 byte delka + ASCII HODNOTA - 2 nebo 8 bytu podle typu na polozku DELKA - 2 byte - offset na dalsi promennou DIM - 1 byte - pocet dimenzi SEZNAMDIM - max. rozmery dimenzi TEXT - delka textu ( 1 byte ) + vlastni text ( ASCII ) LENM - 1 byte - offset na dalsi promennou Cisla a adresy prikazu a funkci jazyka Basic-G a Basic-I ******************************************************** jmeno kod je v BI? jmeno kod je v BI? jmeno kod je v BI? MID$ 41 + MOD 83 + POKE CA + LEFT$ 42 + + 84 + VPOKE CB + RIGHT$ 43 + - 85 + OUT CC + RPT$ 44 + < 86 + CLS CD + POS 45 + = 87 + MPRINT CE LEN 46 + > 88 + PRINT CF + VAL 47 + AND 89 + MAG D0 + ASCII 48 + XOR 8A + CLEAR D1 + CHR$ 49 + OR 8B + FCOL D2 NUM$ 4A + ( 8C + BCOL D3 HEX$ 4B + ) 8D + ERASE D4 LINK 4C NOT 8E + POKEW D5 SGN 4D + OUTW D6 ABS 4E + TRACE A0 + LOCATE D7 RND 4F + AUTO A1 + VSAVE D8 INP 50 + TAPE A2 + CIRCLE D9 PEEK 51 + CONT A3 + WAIT DA VPEEK 52 + DEL A4 + SLEEP DB PEEKW 53 LIST A5 + JOINT DC INPW 54 RENUM A6 PMODE DD VARPTR 55 NEW A7 + GMODE DE INKEY$ 56 + OLD A8 + PLOT DF COLOR 57 CHAIN A9 + MOVE E0 PLAY 58 RUN AA + GMOVE E1 TIME 59 + SAVE AB + GINIT E2 FRE 5A + VERIFY AC + PAINT E3 ERR 5B + PUSH AD GCOPY E4 ERRL 5C + POP AE DRAW E5 ERRL$ 5D + REM AF + BOX E6 JOY 5E END B0 + CONSOLE E7 RCRT 5F FOR B1 + BAR E8 TIME$ 60 NEXT B2 + SG E9 RDCHR$ 61 REPEAT B3 KEY EA DRCT 62 UNTIL B4 OFF EB DIST 63 RESUME B5 SKIP EC RETL 64 IF B6 + LISTC ED LET B7 + ELIST EE ASW 67 GOTO B8 + ELISTC EF INKEY 68 GOSUB B9 + ON F0 RETURN BA + ERROR F1 POST 6A READ BB + @ F2 POINT 6B RESTORE BC + ALARM F3 STATUS 6C DATA BD + ! F4 COINC 6D CALL BE + ESCRN F5 SPRITE 6E STOP BF + STEP F6 + SIN 6F DIM C0 + IN F7 + COS 70 INPUT C1 + THEN F8 + XCHG 71 VIEW C2 + ELSE F9 + MRCRT$ 72 EVENT C3 TO FA + INSTR 73 ALARM$ C4 # FB + CURSOR 7F + RANDOMIZE C5 + , FC + TAB 7E + LOC C6 + ; FD + ^ 80 + STCHR C7 + : FE + * 81 + SCOL C8 + CR FF + / 82 + SCOD C9 + Options For M5 ************** DR-5: Data Recorder ( cassette tape recorder ) for M5 PT-5: 80 Character width-normal character size 160, character width-small cha- racter size.It is a silent printer with the speed of 60 characters per second EB-5: Extension memory box with 3 slots EC-5: Extension memory card with 2 slots EM-5: DRAM 32 kB. Additional memory FD-5: 3" micro floppy disc drive. 320 kB ( both sides ).Work with system disc and data disc PI-5: Parallel interface ( interface between EB5 + FD5 or others ) SI-5: Serial interface ( interface between EB5 and other computers ) BASIC-I CARTRIDGE: for beginners BASIC-G CARTRIDGE: High graphic capability with 16 different colours and high synthesizer music capability, with 6 octaves and intermediary tones. 3 tone chord available BASIC-F CARTRIDGE: With high arithmetic and graphics capability FALC CARTRIDGE: Spreadsheet programme just 10 commands to control GAME CARTRIDGE: 12 games to choose. GRC1 Tank Battalion GRC2 Step Up GRC3 Guttang Cottong GRC4 Heavy Boxing GRC5 Super Cobra GRC6 Real Tennis GRC7 Poo Yan GRC8 Word Maze GRC9 Wonder Hole GRC10 Up Up Balloon GRC/B1 Fruit Search GRC/B2 Dragon Attack LANGUAGE EDUCATION PROGRAMME: ( Cassette tape ) Designed for 8-10 year old students. Domestic and foreign languages available P. EDITOR: ( Cassette tape ) Cassette tape for drawings BASIC G DEMO: ( Cassette tape ) Demonstration programme for BASIC G GAMES CASSETTES: 8 cassette tapes to choose ( each cassette tape has 2 games ) GCT1 Snaky / Barrier Attack GCT2 Jogging / Side Winder GCT3 Solitaire / Tower Of Hanoi GCT4 Three Circles / Number Search GCT5 Black Jack / Slot Machine GCT6 Mini Star Trek / Last Day Of The Earth GCT7 Biorhythm Diagnosis / Music Tone GCT8 Cowboy / Barricade GCT11 Baseball / Zac Banic TV Adjust TV-5: Colour T.V. ( for G PAL ) JP-5: Joy pads for games. Note: Game may also be played using M5 keyboard only CA-5: Travel case MANUALS: ( in English ) M5 Users Guide, M5 Basic I Manual, M5 Basic G Manual, M5 Basic F Manual M5 Falc Manual, M5 Personal Manual, M5 Creative Manual, M5 Monitor Handling ------------------------------------------------------------------------------ Podle ruznych materialu a na zaklade vlastnich zku- senosti sestavil a napsal LZR Soft. V Kladne 1991. Vydani prvni,pocet vytisku dle potreby. Vytisteno na tiskarne LA120 firmy DEC. ------------------------------------------------------------------------------

Původní verze příručky

Původní podoba příručky: HEAP.SM5 (68KB, plain text including escape sequences for the LA120 DECWriter III) od LZR Soft.

Translated version of Handbook: HEAP_ENG.SM5 (67KB, plain text including escape sequences for the LA120 DECWriter III) from LZR Soft /translation: Henrich Raduška/.