Obsah tťto strŠnky
English manual for BSROM140
Slovenskż manuŠl k BSROM140
What's better in BSROM140 as opposed to BSROM118?
V Ťem je BSROM140 lepöŪ nez BSROM118?
Popis zmžn BSROM 140 potÝebnżch pro BSDOS


BSrom140 - Modified ZX Spectrum ROM - (c) Busy soft - Release 22.04.97

Original ROM: (c) Amstrad


It's classic ZX Spectrum ROM with this modifications:

  • some new commands and functions - see below
  • additional syntax of some commands and functions - see below
  • cca four times more speed of pilot signal synchronize from tape
  • program cursor changed from ">" to "*" (for autolisting)
  • increase frequency of error beep (RASP)
  • full work with 16-bit hexadecimal numbers in range 0-65535
  • more speed autorepeat after initialization (new,reset)
  • enter of error line caused move of cursor into error position
  • option for list by ingore control codes (for colors,at,tab)
  • extendable NMI handle program - see below
  • corrected some errors - see below
  • two new characters - small underline and square (code 30,31)
  • program cursor "*" displayed only on autolist
  • full movement on edit area (left,rigth,up,down)
  • more more more more speed reset and new (memory clears by PUSH)
  • new start-up colors after reset and new: paper 0, ink 7
  • stopable autolist by the "Q" key in all moment
  • some enhancements for ZX Spectrum 128k
  • You can write negative number in commands which need 8-bit value. Real value will be your_negative_value + 256.
  • full work with line number range 0-16383 (original ROM was only 1-9999) (You can correctly edit and enter line with number zero!)

Corrected errors

  • Error in original NMI handle routine. But error byte is not modified [if some programs will test it]. There new NMI menu handles it now.
  • PRINT AT 0,0;CHR$ 8; moves cursor into position AT -1,31 There position of cursor is not changed by CHR$ 8 in this ROM.
  • Display of error message if interrupt is disabled. There interrupt is enabled before displaiyng error message in this ROM.
  • Original ROM writes five bytes into address range 0-4. There range address 0-4 is not changed in this ROM. This feature is useful for not disabled write access into RAM address 0-#3FFF.
  • If success of addition or substraction of two integers is -65536 then it failed. (Note: Integer range is -65535 .. +65535)
  • This is another similar bug: If x is in range -65537 .. -65535 (open range) then INT x failed. This bug is fixed too.
  • If last line in basic program is N, you enter empty line N+1 and press EDIT key, then line N is edited into edit area WITH program cursor. There program cursor is not transfer into edit area in this ROM.

It's good idea to run next program to demonstrate INT and -65536 bug:
FOR a=-65538 TO -65533.9 STEP 0.25: PRINT a,INT a : NEXT a
Try this program on classic ZX ROM and then on this bugfixed ROM.

Initialization (reset,new)

System report is not classic message after start. There is displayed information about length of basic, variables and free memory. 48k and 128k reset do not test memory. I think damaged memory is past...

Extendable NMI handler

RESET and NMI signals causes jump into address #00 and #66 and this event is indicated by snowing on black border. If SP was in range 0-#4000 then is set to #5800 value. Control keys:

B - warm start of basic system. All variables are initialized but PROG, VARS and ELINE was not changed. It causes that basic progrm with variables is not deleted.
N - the same as CLEAR #5FFF: NEW - memory above #6000 is not changed.
R - the same as CLEAR #FFFF: NEW - classic 48k reset.
E - extended 128k reset. It clears all 128k memory on Spectrum 128k
I - sets AY to quiet and on MB-02 resets FDC,DMA and stops disk drive
S - save "" screen$ on tape (on MB-02 can save on disk)
T - like USR 15522 - set tape as actual device (only on MB-02)
D - like USR 15524 - set disk as actual device (only on MB-02)
Q - return into broken program. Warning: return will be correct only if SP was not set to #5800! All registers (beside low 7 bit of refresh) are restored to original values.
M - jump into MRS 08/09 debugger. MRS must be loaded into memory. All registers on register panel will be set to values from broken program - you can continue broken program by using any trace mode of MRS debugger. Warning: This feature will works only if SP was not set to #5800 (like as Q-quit).
0..9 - switching of RAM banks on ZX Spectrum 128k. If SP is in range #C000-#FFFF then it will be set to #5800. This is the same as OUT (#7FFD),number - you can see second videoram by pressing 8 or 9 key.
U - user function. There are JP XXXX at address #3901. You can set address of this jump to you own routine. Your routine can end with ret - it causes return into NMI handler.
Z - user function like 'U' but this key is reserved for using in MB-02 applications (for example make snapshots,...). However, if you want use this key, place address of you routine into address #3904.

Additional syntax of old commands

num ...... any expresion with number result
string ... any expresion with string result
Items in brackets < > are optional.

  • CONTINUE <num> ... if num is nonzero then run machine code from this address. Different from USR is if machine code returns (very seldom event:)) IY must be set to #5C3A but HL' can be different #2758.
  • CLS <num> ... if num is nonzero then all attributes and border is set to num. For example: CLS 7 = BORDER 0: PAPER 0: INK 7: BRIGHT 0: FLASH 0.
  • GOTO, GOSUB, PAUSE, BORDER ... numer parameter of this commands is optional, not compulsatory. If parameter not present, means zero value.
  • LOAD, SAVE, VERIFY, MERGE ... string parameter of this commands is optional, not compulsatory. If parameter not present, means empty string.
  • <PRINT> list of items ... Yes, it means that PRINT command is optional ! If list of items is not beginning with characters ,' (comma and apostrophe) then you must not write PRINT command in your program :)
  • POKE address <item1> <item2>... storing item(s) into memory. You can write how many items as you want. Each item may be:
    , 8-bit-num ... stores one byte (the same as classic POKE)
    ; 16-bit-num ... stores one word (two bytes, LSB first)
    , string ... stores string into memory
    ; string ... the same as above but last character has bit 7 = 1 Example: POKE 16384,20;1025,"hello";"world" stores these bytes: 20, 1,4, 104,101,108,108,111,119,111,114,108,228

    Enhaced functions

  • CHR$ num ... If num is 0..255 then this is classic CHR$.But if num = -1 then this function returns whole memory (without byte at add 0) as a string with length 65535 bytes.
  • VAL$ num ... If parameter is number type then result of this function is four character string contains hexadecimal digits of this number. This is very useful for convert number into hexadecimal base.
  • VAL num ... 16-bit PEEK. Returns 16-bit word from address num. This function is opposite to 'POKE add;word' command.
  • % ... prefix character for writing hexadecimal numbers. The same as BIN for writing binary number. Number must be max 16-bit.

    It's recomended to use function CHR$ with parameter -1 with command POKE together for work with memory blocks (or only CHR$ -1 for reading memory). For example LET a$ = (CHR$ -1)(16384 TO 23295) saves screen into variable a$ and then you can do command POKE 16384,a$ to restore saved screen back. Because 'PEEK address' and 'CODE (CHR$ -1)(adresa)' are the same.

    New commands and its syntax

  • , <num> ... comma ... edit of basic line num.
  • ' <num> ... apostrophe ... switching of RAM banks on ZX Spectrum 128k. The same as OUT #7FFD,num. (Be sure that RAMTOP is under #C000!)
  • © ... (c) ... the same as 'B' in NMI handler. Inicialize all system variables besides PROG, VARS and ELINE.
  • ^ ... up arrow ... the same as E in NMI handler. Clears all 128k memory.
  • ? ... displays information about length of basic, variables and free memory. This command is called internally after each reset or new.
  • * ... header ... displays header information from tape in following format: type of file : name of file : address : length
  • _ .. the same as USR 00102 - jump into NMI handler ('Q' continues)
  • # .. the same as USR 54885 - jump into MRS 08/09 (MRS must be loaded)

    One new system variable

    NMI handler does not need vector at address 23728. This address is used for storing three bits with following meaning:

    bit 0=0: number of basic lines is displayed with four digits
    bit 0=1: number of basic lines is displayed with five digits
    bit 1=0: control codes in autolist is displayed normally
    bit 1=0: control codes in autolist is displayed by bit 2
    bit 2=0: do not display control codes in autolist
    bit 2=1: display all control codes as "_" character (code 30).

    This variable is initialized to zero value after reset or new.

    Five digits displaying of basic numbers is very useful if you use line range 0 to 16383. This feature has no effect to running of basic program. If you edit any basic line then this line is edited with five digit numbers always. If number is under 10000 then it's space blanked from left.


    There is a little free space on address #3C98-#3CEF in this ROM. The space is reserved for MB-02 extensions. If you have no MB-02 then you can use the space for some your routines as you want.

    Thanx to this peoples: - Milan Pikula - WWW (www@crazy.elf.stuba.sk) - Ian Collier (sorry, I don't know his e-mail) for their modified ROMs. I get some ideas from these ROMs. (But only ideas, all routines are my own.)


    BSrom140 - Modifikovana ZX Spectrum ROM - (c) Busy soft - Release 22.04.97

    Originalna romka: (c) Amstrad


    Jedna sa o klasicku romku zo ZX Spectra na ktorej boli spachane tieto upravy:

    • pribudlo zopar novych prikazov a funkcii - prehlad dalej
    • rozsirena syntax niektorych prikazov a funkcii - prehlad dalej
    • asi stvornasobne rychle chytanie uvodneho tonu z magnetofonu
    • programovy kurzor zmeneny zo znaku ">" na znak "*"
    • zvysena frekvencia chyboveho beepu
    • spracovanie hexadecimalnych cisel v rozsahu 0-65535
    • moznost pisania basicovych riadkov v rozsahu 0-16383 (mozete normalne editovat a odosielat aj nulty riadok!)
    • v prikazoch ocakavajucich 8-bitovu hodnotu mozete pisat aj zaporne cisla, realna hodnota bude potom o 256 vecsia.
    • rychlejsi autorepeat na zaciatku po inicializacii
    • pri pokuse o odoslanie chybneho prikazu alebo riadku skoci kurzor na miesto chyby (lepsie ako v IZO-ROM)
    • moznost vypisovat listing programu bez riadiacich kodov (nereaguje na farby, TAB a AT - vhodne na zasite programy)
    • osetrenie NMI pomocou rozsiritelneho menu - prehlad dalej
    • opravene niektore chyby - prehlad dalej
    • dva nove znaky v znakovom subore - maly podciarnik a stvorcek
    • programovy kurzor "*" sa vypisuje iba pri autoliste
    • po editacnej zone sa da chodit hore a dolu
    • resety a NEW mazu pamet pomocou PUSH - je to super rychle
    • nove farby po resetoch a NEWe: ink 7, paper 0
    • autolist mozno v kazdom okamihu zastavit klavesou "Q"
    • niekolko vymozenosti pre uzivatelov ZX Spektra 128k

    Prehlad chyb, ktore boli opravene

    • Chybne osetenie NMI rutiny - vyriesilo to NMI menu. Ale prislusny bajt zostal nezmeneny - to keby ho nahodou nejaky program moc usilovne zacal skumat a testovat
    • PRINT AT 0,0;CHR$ 8; - posunulo kurzor na poziciu AT -1,31 - v tejto romke sa poloha kurzora nemeni.
    • Ak sa malo vypisat chybove hlasenie a je zakazane prerusenie, tak to zmrzlo. V tejto romke sa to nemoze stat.
    • Normalna romka sama seba na adresach 0..4 prepisuje. Tato romka nie, preto moze bezat aj bez zakazaneho zapisu v ramke.
    • Ak vysledok scitania alebo odcitania dvoch cisel v rozsahu -65535 az 65535 mal vyjst -65536, dopadlo to zle. V tejto romke je tato chyba scitania uz osetrena.
    • S chybou -65536 suvisi aj chybny vypocet INT x, kde x=-65536.9 az -65535.1 Tento vypocet je tiez osetreny.
    • Ak je posledny riadok v programe N, vy odoslete prazdny riadok N+1 (akoze ho zmazete) a potom stlacite EDIT, editne sa vam N-ty riadok aj s programovym kurzorom. V tejto romke sa programovy kurzor objavuje iba pri autolistingu a preto sa nikdy nemoze objavit v editnutom riadku.

    Na demonstraciu chyby -65536 a chyby INT je vhodny nasledujuci program:

    FOR a=-65538 TO -65533.9 STEP 0.25: PRINT a,INT a : NEXT a

    Schvalne si ho skuste spustit na povodnej ZX romke, a na tejto opravenej.

    Po starte alebo NEWe sa romka prihlasi vypisanim informacie, kolko je volneho miesta (basic a premenne basicu maju vtedy samozrejme nulovu dlzku) a vypise sa normalne hlasenie OK. 48k a 128k reset a ani NEW netestuju pamet - predpoklada sa, ze cela 48kB alebo 128k pamet je funkcna.

    Po resete alebo NMI (skoku na adresy #00 alebo #66) zacne srsat border, co je znakom ze ste v NMI menu. Ak by bol zasobnik SP na adresach #00-#4000, zmeni sa na #5800. Ovladacie klavesy:

    B - teply start basicu. Inicializuju sa vseky systemove premenne okrem PROG, VARS a ELINE - teda basicovy program a basicoe premenne zostanu zachovane.
    N - podobne ako CLEAR #5fff: NEW - teda pamet nad #6000 ostane neporusena.
    R - zmaze celu pamet 48kB - je to klasicky 48k reset.
    E - zmaze celu pamet 128k - (extend reset 128k)
    I - resetuje tieto periferie: AY, FDC, DMA a mechaniku disku.
    S - save "" screen$ na aktualne zariadenie (MG alebo disk)
    T - ako USR 15522 cize aktualne zariadenie bude paska.
    D - ako USR 15524 cize aktualne zariadenie bude disk.
    Q - navrat spat do preruseneho programu. Pozor: navrat bude korektny iba vtedy, ak SP nebol zmeneny na #5800. Pri navrate su vsetky registre (okrem dolnych 7 bitov registra R) obnovene na povodne hodnoty.
    M - skok do debuggera v MRS (musi byt v pameti!). Vsetky registre sa nastavia ako boli v okamihu prerusenia programu pomocou MNI - cize mozno preruseny program dalej krokovat (PC a SP sa korektne nastavia iba ak sa SP nezmenilo na #5800!).
    0..9 - prepnutie ram-banky na 128k. Ak by sa SP nachadzal v oblasti hornych 16 kB, bude zmeneny na #5800. Je to vlastne OUT (#7ffd),cislo - cize pomocou 8 a 9 si mozno pozriet obsah druhej videostranky.
    U - uzivatelska funkcia - na adrese #3901 je JP XXX, kde si moze uzivatel napokovat adresu svojej aplikacie a po stlaceni klavesy "U" sa tato aplikacia spusti. Navrat je normalne pomocou RET.
    Z - uzivatelska funkcia - na adrese #3904 je DW xxx, a dalej presne tak isto ako "U". Tieto dve funkcie v samotnej romke nerobia nic, ale su vyhradene pre dalsie rozsirenia (napr. rezidentny monitor).

    Rozsirenie syntaxe existujucich prikazov
    (Polozky v zatvorkach < > su nepovinne.)

  • CONTINUE <vyraz> .. ak je vyraz nenulovy tak sa spusti strojak od tejto adresy. Pozor ! Pri navrate musi byt na rozdiel od USR register IY nastaveny na #5c3a, ale zato HL' nemusi mat hodnotu #2758.
  • CLS <vyraz> .. ak vyraz je nenulovy tak sa nim nastavia vsetky farby (pr. CLS 7 = BORDER 0: PAPER 0:INK 7:BRIGHT 0:FLASH 0).
  • GOTO, GOSUB, PAUSE, BORDER .. ciselny parameter pri tychto prikazoch je nepovinny, nezadany sa chape ako nula.
  • LOAD, SAVE, VERIFY, MERGE .. retazcovy parameter pri tychto prikazoch je nepovinny, nezadany sa chape ako prazdny retazec.
  • <PRINT> zoznam poloziek .. Za predpokladu, ze zoznam poloziek nezacina cislicou, ciarkou, a apostrofom mozete pokojne vynechat prikaz PRINT. Totiz ak sa pri behu programu najde nieco, co nie je ziadny prikaz, skoci sa do rutinky na prikaz PRINT.
  • POKE adresa <polozka1> <polozka2>... ukladanie poloziek do pameti. Poloziek moze byt lubovolny pocet. Moznosti poloziek:
    , 8-bit-hodnota ... ulozenie jedneho bajtu do pameti
    ; 16-bit-hodnota ... ulozenie dvojbajtovej hodnoty
    , retazec ... ulozenie retazca postupne po znakoch
    ; retazec ... posledny znak retazca bude mat nastaveny siedmy bit Priklad: POKE 16384,20;1025,"ahoj";"cau" ulozi do pameti tieto bajty: 20, 1,4, 97,104,111,106, 99,97,245 Samozrejme ze vsade, kde sa ocakava nejaka hodnota (ciselna alebo retazcova) mozno napisat lubovolny vyraz prislusneho typu.

    Rozsirenie niektorych funkcii

  • CHR$ vyraz .. ak je vyraz v rozsahu 0..255, pracuje ako predtym, t.j. vrati prislusny znak ktoreho kod je hodnota vyrazu. Ale ak vyraz nadobudne hodnotu -1, potom tato funkcia vrati skoro celu pamet - t.j. retazec dlhy 65535 znakov. (Vratit vsetkych 65536 bajtov by bolo technicky problematicke).
  • VAL$ vyraz .. ak je vyraz ciselneho typu, tak vysledkom tejto funkcie je stvorznakovy retazec hexadecimalnych cislic - inac povedane prevod DEC -> HEX (pr. VAL$ 33023 = "80ff").
  • VAL vyraz .. ak je vyraz ciselneho typu, tak vysledkom tejto funkcie je dvojbajtove cislo ulozene na tejto adrese - inac povedane dvojbajtovy PEEK.
  • % .. prevod HEX -> DEC podobne ako je BIN prevod BIN -> DEC. Inac povedane ak chcete ako cislo zapisat hexadecimalnu konstantu, musi zacinat znakom "%". Znak "#" nebol pouzity preto, lebo ten sa pouziva na nastavenie kanala v prikazoch PRINT A INPUT (priklad: zapis %80ff je totozny s 33023).

    Funkciu CHR$ s parametrom -1 je velmi vyhodne pouzivat spolu s prikazom POKE na pracu s blokmi pameti, alebo aj samostatne na citanie pameti. Napriklad prikaz LET a = (CHR -1)(16384 TO 23295) odlozi do premennej a$ obrazovku. Potom zase prikaz POKE 16384,a$ vrati odlozenu obrazovku spet. Pretoze zapisy "PEEK adresa" a "CODE (CHR$ -1)(adresa)" su totozne.

    Nove prikazy a ich syntax

  • , <vyraz> .. (ciarka) editne prislusny basicovy riadok. Ak vyraz nie je uvedeny alebo nadobuda nulovu hodnotu, edituje sa riadok s najnizsim poradovym cislom.
  • ' <vyraz> .. (apostrof) prepina ram-banky na 128k ako OUT (#7ffd),vyraz (podobne ako 0-9 v NMI menu). Vyraz musi byt v intervale 0 az 15. Pozor! Pri prepinani musi byt RAMTOP mensi ako #c000.
  • © .. obnovi vsetky systemove premenne okrem PROG, VARS a ELINE. (Ako "B" v NMI menu.) [C v kruzku]
  • ^ .. velky 128k reset - maze celu pamet 128k. (Ako "E" v NMI menu.) [sipka hore]
  • ? .. vypise informaciu o dlzke programu, dlzke premennych a velkost volnej pamete pre basic.
  • * .. header - z pasky cita hlavicky a vypisuje o nich toto: typ suboru : meno suboru : adresa : dlzka
  • _ .. to iste ako USR 00102 - skok do NMI menu.
  • # .. to iste ako USR 54885 - skok do MRS (musi byt v pameti!).

    Jedna nova systemova premenna

    Kedze NMI rutinka vzdy zavola NMI menu, nepotrebuje uz vektor na adrese 23728. Preto tri bity na 23728 su takto vyuzite:

    bit 0=0:cisla basicovych riadkov sa vypisuju ako stvormiestne
    bit 0=1:cisla basicovych riadkov sa vypisuju ako petmiestne
    bit 1=0:pri autoliste sa vypisuju riadiace kody normalne
    bit 1=1:pri autoliste sa vypisuju riadiace kody podla bitu 2
    bit 2=0:pri autoliste sa vobec nevypisuju riadiace kody
    bit 2=1:pri autoliste sa vypisuju riadiace kody ako "_"

    Po resete alebo newe sa tu zapise nula. Petmiestne cisla riadkov maju vyznam vtedy, ak pouzivate riadky v rozsahu 10000 az 16383. Tento bit nijako neovplyvnuje beh programu s takymito riadkami, len meni format listingu. Pri editovani riadku sa jeho cislo vypise vzdy ako petmiestne.


    Na adresach #3C98-#3CEF sa nachadza kusok volneho miesta. Toto miesto je rezervovane pre pouzitie v MB-02. Ale ak nemate MB-02 tak si mozete toto miesto vyuzit pre svoje vlastne ucely.

    Na zaver by som chcel podakovat tymto ludom - Milan Pikula - WWW (www@crazy.elf.stuba.sk) - Ian Collier (jeho e-mail adresu neviem) za ich modifikovane romky, ktorymi som sa nechal inspirovat a z ktorych som si dovolil "pozicat" si niektore napady. (Ale len napady a nic viac, vsetky rutinky mam vlastne).


    Busy- 9.11.2013


    Whatís better in BSROM 140 than in BSROM 118?


    Changes 118 -> 140
     + Fixed bug of INT x, where x=-65536.9 to -65535.1
     + Fixed bug of addition (-65535-1 is now -65536)
     + Fixed bug of multiplication (bad jump in routine)
     + Fixed bug of double store of string in SCREEN$

     + Command '*' - header: '?' replaced by '_' (code 30)
     + Autolisting - control codes:  '?' replaced by '_' too
     + New start-up colors after resets and NEW: BORDER 1:PAPER 0:INK 7
     + Better handler for 'Scroll ?' in displaying mg. headers
     - Hexadecimal numbers only after character '%' (& is removed)
     + You can write negative number in commands what need 8-bit value
     + Some OUTs in NMI menu is corrected

     + MG. commands with optional string parameter (name of program)
     + New feature in function CHR$ (it can return whole memory as string)
     + Command POKE with enhacement syntax (you can write more parameters)




    Busy- 9.11.2013


    Pro zajimavost, v cem je BSROM140 lepsi nez BSROM118?


    Zmeny 118 -> 140
     + Opravena chyba INT x, kde x=-65536.9 az -65535.1
     + Opravena chyba scitania (-65535-1 uz je -65536)
     + Opravena chyba nasobenia (chybny skok v rutinke)
     + Opravena chyba dvojiteho ukladania retazca v SCREEN$

     + Prikaz "*" - header: namiesto "?" vypisuje novy znak ciarku
     + Autolist - namiesto kodov vypisuje tiez ciarku (pri POKE 23728,6)
     + Nove startovacie farby po resetoch a NEWe: BORDER 1:PAPER 0:INK 7
     + Lepsie osetreny "Scroll ?" pri vypise magnetofonovej hlavicky
     - Hexadecimalne cisla sa uz pisu len po znaku '%' (& je zruseny)
     + V prikazoch kde sa pise jednobajtove cislo, mozno napisat aj zaporne.
     + Skorigovane niektore adresy a OUTy v NMI menu

     + Magnetofonove prikazy s nepovinnym menom suboru
     + Nova funkcia CHR$ (pri zapornom parametri vrati celu pamet)
     + Prikaz POKE s celkom novou rozsirenou syntaxou (viac parametrov naraz)



    0000†††††††††††† ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    0000†††††††††††† ;; Zmeny v BSrom140 potrebne pre BSDOS† ;;

    0000†††††††††††† ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    0000†††††††††††† ;; [x] .. zmeny specificke pre BSrom140 ;;

    0000††††††† †††††;; Pre ine romky ich treba spravit inak ;;

    0000†††††††††††† ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    0000†††††††††††† ;; Pouzivane sluzby BSDOSu:


    0000†††††††††††† em562†† =†††††† #20

    0000†††††††††††† em4c6†† =†††††† #21

    0000†††††††††††† basic†† =†††††† #31

    0000†††††††††††† funkc†† =†††††† #32



    04AA†††††††††††† ;; [x] Rutinka pre nepovinny parameter pre mgf prikazy

    04AA†††††††††††† ;; [x] uz nie je potrebna lebo toto zabezpecuje priamo BSDOS

    04AA††††† †††††††

    04AA 00††††††††††††††††† block†† 24,0††† ;; Volne miesto pre dalsie patchy



    04C6†††††††††††† ;; Napichnutie load-save rutiniek pre tape emulaciu


    04C6 CD CD 0E††††††††††† call††† tstsav† ;; SAVE #4C6

    04C9† †††††††††††


    0559 00††††††††††††††††† nop†††††††††††† ;; Predbezne nezakazuj prerusenie



    055C 3E††††††††††††††††† db††††† #3E†††† ;; Predbezne nemen farbu borderu



    0562 CD DB 0E††††††††††† call††† tstloa† ;; LOAD #562



    060E 00††††††††††††††††† nop†††††††††††† ;; Nacitanie mena suboru

    060F 00††††††††††††††††† nop†††††††††††† ;; pre LOAD/VERIFY/MERGE

    0610 00††††††††††††††††† nop†††††††††††† ;; zabezpecuje priamo BSDOS



    0990 02††††††††††††††††† db††††† #02†††† ;; Pri SAVE cakaj iba 2/50 sec



    0A53 C0††††††††††††††††† ret†††† nz††††† ;; Nepouzivaj ZX Printer

    0A54 00††††††††††††††††† nop

    0A55 00††††††††††††††††† nop



    0B8E 11††††††††† ††††††††db††††† #11†††† ;; Nepouzivaj ZX Printer



    0EAC†††††††††††† ;; Na tomto mieste boli povodne rutinky pre ZX Printer,

    0EAC†††††††††††† ;; ale teraz je toto miesto vyuzite na patchy pre BSDOS.


    0EAC C9††††††††† ††††††††ret†††††††††††† ;; Pre istotu (ak by niekto volal COPY)


    0EAD EF††††††††† stkdup† rst†††† #28†††† ;; Zdvojenie udaja

    0EAE 31††††††††††††††††† db††††† #31†††† ;; na zasobniku kalkulacky

    0EAF 38††††††††††††††††† db††††† #38†††† ;; (pouziva BSDOS pri vypocte)

    0EB0 C9††††††††††††††††† ret


    0EB1 2E 40 24 60 znkcmd† db††††† '.@$`'† ;; Zaciatocne znaky novych prikazov


    0EB5 21 B1 0E††† newcmd† ld††††† hl,znkcmd ;; Rozsireny basic interpreter

    0EB8 01 04 00††††††††††† ld††††† bc,#04

    0EBB ED B1†††††††††††††† cpir

    0EBD C2 22 3B††††††††††† jp††††† nz,#3B22† ;; [x]

    0EC0 32 74 5C††††††††††† ld††††† (23668),a

    0EC3 3E††††††††††††††††† db††††† #3E

    0EC4 F1††††††††† cmdmgf† pop†††† af

    0EC5 ED 73 3F 5C cmdexe† ld††††† (23615),sp

    0EC9 3E 31†††††††††††††† ld††††† a,basic

    0ECB 18 20†††††††††††††† jr††††† doscal


    0ECD 21 AE 3C††† tstsav† ld††††† hl,tapdsk ;; Obsluha pre SAVE #4C6

    0ED0 CB 46†††††††††††††† bit†††† 0,(hl)

    0ED2 21 80 1F††† ††††††††ld††††† hl,#1F80

    0ED5 C8††††††††††††††††† ret†††† z

    0ED6 6F††††††††††††††††† ld††††† l,a

    0ED7 3E 21†††††††††††††† ld††††† a,em4c6

    0ED9 18 11†††††††††††††† jr††††† loasav


    0EDB 3A AE 3C††† tstloa† ld††††† a,(tapdsk) ;; Obsluha pre LOAD #562

    0EDE 0F††††††††††††††††† rrca

    0EDF 38 09†††††††††††††† jr††††† c,loados

    0EE1 F3††††††††††††††††† di

    0EE2 3E 0E†††††††††††††† ld††††† a,#0e

    0EE4 D3 FE†††††††††††††† out†††† (#fe),a

    0EE6 DB FE†††††††††††††† in††††† a,(#fe)

    0EE8 1F††††† ††††††††††††rra

    0EE9 C9††††††††††††††††† ret

    0EEA 3E 20†††††† loados† ld††††† a,em562

    0EEC C1††††††††† loasav† pop†††† bc

    0EED CD A0 3C††† doscal† call††† bnkcal† ;; Volanie sluzby bsdosu

    0EF0 20 00†††††††††††††† dw††††† #20†††† ;; adresa pre RST #20

    0EF2 C9††††††††††††††††† ret


    0EF3 3E 32†††††† newfnc† ld††††† a,funkc ;; Rozsirenie funkcie FN x()

    0EF5 CD ED 0E††††††††††† call††† doscal

    0EF8 CA 12 27††††††††††† jp††††† z,#2712

    0EFB DF††††††††††††††††† rst†††† #18

    0EFC CD 30 25 †††††††††††call††† #2530

    0EFF CA C3 27††††††††††† jp††††† z,#27C3

    0F02 C3 F8 27††††††††††† jp††††† #27F8


    0F05 00††††††††††††††††† block†† 38,0††† ;; Volne miesto pre dalsie patchy



    1304†††††††††††† ;; Zmeny vo vypise chybovych hlaseni


    1304 76††††††††††††††††† halt††††††††††† ;; Pred vypisom hlasenia pockaj na luc

    1305 00††††††††††††††††† nop†††††††††††† ;; (povodne tu HALT bol ale v bsrom je iba EI)

    1306 00††††††††††††††††† nop

    1307 00†††††† †††††††††††nop

    1308 FD CB 01 AE†††††††† res†††† 5,(iy+1)

    130C 00††††††††††††††††† nop†††††††††††† ;; 6 bajtov je usetrenych vdaka tomu

    130D 00††††††††††††††††† nop†††††††††††† ;; ze sa nepouziva/nepodporuje ZX Printer

    130E 00††††††††††††††††† nop††††† †††††††;; a nie je treba mazat buffer tlaciarne



    1AA8†††††††††††† ;; Nova syntax starych prikazov


    1AA8 05††††††††††††††††† db††††† #05†††† ;; NEW <cislo>

    1AA9 C5 0E†††††††††††††† dw††††† cmdexe



    1AD6 05††††††††††††††††† db††††† #05†††† ;; COPY <cislo>

    1AD7 C5 0E†††††††††††††† dw††††† cmdexe



    1B14 05††††††††††††††††† db††††† #05†††† ;; CAT <cislo>

    1B15 C5 0E†††††††††††††† dw††††† cmdexe



    1B44†††††††††† ††;; Napichnutie basic interpretra


    1B44 B5 0E†††††††††††††† dw††††† newcmd† ;; Nove basicove prikazy [x]



    1CDC C4 0E†††††††††††††† dw††††† cmdmgf† ;; Prikazy pre magnetofon



    25F6 F3 0E††††††††† †††††dw††††† newfnc† ;; Nove funkcie FN x()



    3C98†††††††††††† ;; ROM bios v romke


    3C98 18 32†††††† setrwp† jr††††† romdis† ;; #3C98 Set rom bank + write protect

    3C9A 18 35†††††† setdwp† jr††††† dosdis† ;; #3C9A Set dos bank + write protect

    3C9C 18 38†††††† setrwe† jr††††† romena† ;; #3C9C Set rom bank + write enable

    3C9E 18 3B†††††† setdwe† jr††††† dosena† ;; #3C9E Set dos bank + write enable

    3CA0 18 0D†††††† bnkcal† jr††††† bncall† ;; #3C9A Call other bank

    3CA2 AF††††††††† settap† xor†††† a†††††† ;; 15522 Set tape

    3CA3 E6††††††††††††††††† db††††† #e6

    3CA4 3E 7F†††††† setdsk† ld††††† a,#7f†† ;; 15524 Set disk

    3CA6 CD 9C 3C††††††††††† call††† setrwe

    3CA9 32 AE 3C††††††††††† ld††††† (tapdsk),a

    3CAC 18 EA††††† †††††††††jr††††† setrwp


    3CAE 03††††††††† tapdsk† db††††† #03†††† ;; Bit0: 0=tape,1=disk


    3CAF CD 9C 3C††† bncall† call††† setrwe

    3CB2 22 C7 3C††††††††††† ld††††† (reghl+1),hl

    3CB5 E1††††††††††††††††† pop†††† hl

    3CB6 23††††††††††††††††† inc†††† hl

    3CB7 23††††††††††††††††† inc†††† hl

    3CB8 E5††††††††††††††††† push††† hl

    3CB9 F5††††††††††††††††† push††† af

    3CBA 2B††††††††††††††††† dec†††† hl

    3CBB 7E††††††††††††††††† ld††††† a,(hl)

    3CBC 2B††††††††††††††††† dec†††† hl

    3CBD 6E††††††††††††††††† ld††††† l,(hl)

    3CBE 67††††††††††††††††† ld††††† h,a

    3CBF F1††††††††††††††††† pop†††† af

    3CC0 E5††††††††††††††††† push††† hl

    3CC1 21 C9 3C††††††††††† ld††††† hl,switch

    3CC4 E3††††††††††††††††† ex††††† (sp),hl

    3CC5 E5††††† ††††††††††††push††† hl

    3CC6 21 55 55††† reghl†† ld††††† hl,#5555

    3CC9 C3 9E 3C††† switch† jp††††† setdwe


    3CCC†††††††††††† ;; Nasledujuci kod je hardwerovo zavisla cast ROM biosu,

    3CCC†††††††††††† ;; preto sa priamo v samotnej romke nenachadza,

    3CCC†††††††††††† ;; ale sa doplni az po nabootovani systemu.


    3CCC F5††††††††† romdis† push††† af

    3CCD 3E 40†††††††††††††† ld††††† a,#40†† ;; <- stranka rom - zakaz zapisu

    3CCF 18 0D†††††††††††††† jr††††† bnkout

    3CD1 F5†† †††††††dosdis† push††† af

    3CD2 3E 41†††††††††††††† ld††††† a,#41†† ;; <- stranka dos - zakaz zapisu

    3CD4 18 08†††††††††††††† jr††††† bnkout

    3CD6 F5††††††††† romena† push††† af

    3CD7 3E 60†††††††††††††† ld††††† a,#60†† ;; <- stranka rom - povolenie zapisu

    3CD9 18 03†††††††††††††† jr††††† bnkout

    3CDB F5††††††††† dosena† push††† af

    3CDC 3E 61†††††††††††††† ld††††† a,#61†† ;; <- stranka dos - povolenie zapisu

    3CDE D3 17†††††† bnkout† out†††† (#17),a

    3CE0 F1††††††††††††††††† pop†††† af

    3CE1 C9††††††††† ††††††††ret


    3CE2 00††††††††††††††††† block†† 14,0





    †† Label

    †- -----------------------------------------------------------

    †† em562

    †† em4c6

    †† basic

    †† funkc

    †† tstsav

    †† tstloa

    †X stkdup

    †† znkcmd

    †† newcmd

    †† cmdmgf

    †† cmdexe

    †† doscal

    †† tapdsk

    †† loasav

    †† loados

    †† bnkcal

    †† newfnc

    †† setrwp

    †† romdis

    †X setdwp

    †† dosdis

    †† setrwe

    †† romena

    †† setdwe

    †† dosena

    †† bncall

    †X settap

    †X setdsk

    †† reghl

    †† switch

    †† bnkout