SVI-3x8 BIOS routines
This page was last modified 09:48, 4 April 2021 by NYYRIKKI.
Address Name Description
0008 SYNCHK Looks at the current (HL) character to check if it equals the
 character after SYNCHK call, otherwise "Syntax Error"
0010 CHRGET Incr HL, get character into A and set flags: C=numeric, Z=EOL
 (":" or 0)
0018 OUTDO Output a character in A using PRTFLG, TTYPOS, etc.
0020 COMPAR Compares HL and DE : HL>DE sets C, HL=DE sets Z
0026 HOKENT (W) Hook base address (normally FE79h)
0028 SIGN Returns A=-1 if FAC<0, 0 if FAC=0, 1 if >0, works on
 single and double precision constants.
0030 GETYPR Get valtyp and set condition codes (flags). INT=2 (SIGN),
 STR=3 (Z), SNG=4 (ODD P), DBL=8 (NC)
0038 KEYINT Interrupt handler
003B CHSNS Sense keyboard buffer for character, sets Z if no key
003E CHGET Get character from keyboard buffer (waits), returns key in A
0041 CHPSTT Line printer status test, Z if not ready
0044 CHPLPT Line printer character output, A contains the character
0047 INITXT Initialize VDP to 40x24 Text Mode (screen 0)
004A INIGRP Initialize VDP to Graphics Mode (screen 1)
004D INIMLT Initialize VDP to Multicolor Mode (screen 2)
0050 FNKSB Check if function key display on (CNSDFG), and shows them if
 it's on.
0053 ERAFNK Erase function key display
0056 DSPFNK Display function keys
0059 RSTFNK Initialize function key strings
005C BREAKX Check CTRL-STOP key directly, C if pressed
005F JMPBNK Jump to memory bank
0062 CALBNK Call on a subroutine in another memory bank
0066 NMI Non Maskable Interrupt handler
0069 CSRDON Cassette motor on and wait for Sync and Header
006C CASIN Read data byte for byte from the cassette to A
006F CTOFF Cassette motor off
0072 CWRTON Cassette motor on and write Sync and Header
0075 CASOUT Write data byte for byte from A to the cassette
0078 CTWOFF Write 0 to the cassette and turn motor off
007B CRDO Put CR to output device
007E CRDONZ Put CR to output device if not at left position
0081 OUTDLP Put char in A to Lpt and decode TAB, CR and skip rest of the
 Ctrl-characters
0084 STRINI
0087 PUTNEW
008A FRESTR
008D STROUT
0090 READYR Reset stack when Basic externally stopped and then restart
0093 SNERR Print "Syntax Error"
0096 ERROR Print error number in E
0099 NTDERR
009C READY Warmstart
009F LINKER Goes through the program and fixes links
00A2 NEWSTT New statement fetcher
00A5 FCERR Function call error
00A8 FINLPT Reset output device to video and move Lpt head to left margin
00AB EVAL Evaluate variable, constant, function call. Put result in FAC
00AE FRMEVL Formula evaluation routine
00B1 GETBYT
00B4 FRMQNT Get integer value from formula
00B7 CONINT Convert FAC to an integer in DE
00BA SNGFLT Return A as integer
00BD GETIN2
00C0 CRUNCH Translates all reserved words into tokens
00C3 CHEAD Goes through program and fixes links from position in DE
00C6 CONIA Convert signed number in A to integer
00C9 INEG2 Convert integer into single precision, put in FAC
00CC MAKINT Put HL in FACLO, set valtyp to integer
00CF DIOERR
00D2 POPALL
00D5 EOF Close file with # in FAC
00D8 POPHRT
00DB LINPRT
00DE OMERR Fixes program links, resets SAVSTK and prints "Out of
 memory"
00E1 RUNC Initiates for RUN
00E4 NAMSCN Scan filename and device
00E7 SCNBLK Scan block
00EA GETFLP Get pointer to file with number in FAC
00ED GETPTR Same as above but number in A
00F0 SETFIL Test if file with # in A is open and returns pointer
00F3 NULOPN Open file: Drive in D, mode in E (4=filemode no
 "FOR", 1="INPUT", 2="OUTPUT",
 8="APPEND"), file# in A
00F6 CLSFIL Close file# in A
00F9 NOCLSB
00FC CLSALL Close all files if NLONLY<>0
00FF FILOU1 Writes a character in A into disc
0102 INDSKC Gets a character from disk into A. Carry if EOF
0105 CLRBUF Clears data buffer of selected file. On return HL points at
 start of buffer
0108 DOCLR Clear B # of bytes starting at HL
010B NOSKCR
010E DERBFN BAD FILE NAME
0111 DERFAO FILE ALREADY OPEN
0114 DERFNF FILE NOT FOUND
0117 DERFNO FILE NOT OPEN
011A DERIER INTERNAL ERROR
011D DERRPE READ PAST EOF
0120 MAKUPL Convert to uppercase IN: (HL) Out: A
0123 CRN2ND
0126 PUTBNK Write A to (HL) in bank B and return to bank C.
0129 GETBNK Read A from (HL) in bank B and return to bank C
012C GETDEV Returns device # in A from PTRFIL (F997H)
012F NOROOM No room for program loaded from disk: Erase, Close files and
 print "OUT OF MEMORY"
0132 CHKTOP Check if enough room, else fall into NOROOM
0135 GETBF1 HL=HL+9
0138 DERFOV FIELD OVERFLOW
013B NAMSC1
013E DERSAP
0141 FILSCN
0144 GETBUF
0147 BEEP
014A CNVCDO
014D GETLEN
0150 GETTRM
0153 GETCOD
0156 SETTRM
0159 TERMIN
015C FINPRT
015F GTBYTC
0162 INTIDX
0165 INILIN
0168 FRCSTR
016B GETSPA
016E CKCNTC
0171 SCRTCH New command
0174 FRCINT
0177 INDSKE
017A PTRGET Get pointer to variable in HL, returns DE as start and HL as
 end pointer. DE=0 if no variable found
017D SPSVEX


Address Name Description
3536 WRTVDP Write B to VDP register C
35C5 GETCHR Copy character A outlook to FDCC
372A WRTVRM Write A to VRAM pointed by HL
373C SETWRT Set VRAM write address by HL
3747 SETRD Set VRAM read address by HL
3759 CHGCLR Change colors (FORCLR=FA0A, BAKCLR=FA0B)
3762 SETCOL A=Border color
3768 EXITGR Go to SCREEN 0
4788 SVLOGO Display Spectravideo logo (no screen init)
48E9 MAPXYC BC=X, DE=Y (CLOC=FAC0, CMASK=FAC2)
4A59 SETBIT Set bit in VRAM (CLOC=FAC0, CMASK=FAC2)