0000 C  RST_00
0000 +  prevent interrupts
0002 +  continue at 0674H
0008 C  RST_08
0008 +  continue at 4000H and from there at 1C96H
0010 C  RST_10
0010 +  continue at 4003H and from there at 1D78H
0013 ;  DCB input (AF,DE)
0013 ;  I: DE = DCB address
0013 ;  O: A  = byte read
0013 C  INCH
0014 +  DCB type is input
0018 C  RST_18
0018 +  continue at 4006H and from there at 1C90H
001B ;  DCB output (AF,DE)
001B ;  I: DE = DCB address
001B ;  I: A  = byte to output
001B ;  O: -
001B C  DCB_output
0020 C  RST_20
0023 ;  DCB in/out (AF,DE)
0023 ;  I: DE = DCB address
0023 ;  O: ?
0023 C  DCB_in_out
0028 C  RST_28
002B ;  get keyboard (AF,DE)
002B ;  I: -
002B ;  O: A = ASCII code of character
002B C  KEY_get
0030 C  RST_30
0033 ;  display (AF,DE)
0033 ;  print a character on the screen
0033 ;  I: A = ASCII code of character
0033 ;  O: -
0033 C  OUTCH
0038 C  RST_38
003B ;  print (AF,DE)
003B ;  I: ASCII code of character to print
003B ;  O: -
003B C  DCB_print
0040 C  INLINE
0046 C  DCB_in_out
0049 ;  wait for key (AF,DE)
0049 ;  I: -
0049 ;  O: A = ASCII code of character
0049 C  INCHW
0050 B  KBD_ascii_table
0050 ;	translation table for the keyboard subroutine
0050 +	RETURN
0051 +	RETURN SHIFT
0052 +	CLEAR
0053 +	CLEAR SHIFT
0054 +	BREAK
0055 +	BREAK SHIFT
0056 +	CURSOR UP
0057 +	CURSOR UP SHIFT
0058 +	CURSOR DOWN
0059 +	CURSOR DOWN SHIFT
005A +	CURSOR LEFT
005B +	CURSOR LEFT SHIFT
005C +	CURSOR RIGHT
005D +	CURSOR RIGHT SHIFT
005E +	SPACE
005F +	SPACE SHIFT
0060 ;  sleep BC (AF,BC)
0060 ;  I: BC counter (BC * 11.3 us delay)
0060 C  sleep_BC
0066 ;  NMI entry (reset key)
0066 C  reset
006C ;  prepare ram for BASIC
006C C  start4
007B C	start5a
007D ;  no ROM with basic found
007D C  start6
008B ;  ROM with basic found
008B C  start7
00E9 ;  enter number at MEM SIZE?
00E9 C  SUB_mem_size
00FA ;  limit memory
00FA ;  I: HL = address of top memory + 1
00FA C  SUB_mem_top
0118 A  MSG_mem_size
0121 A  MSG_colour_basic
012F B
0132 C  BAS_CHECK
0135 C  BAS_SET
0138 C  BAS_RESET
0140 C  start5
014F C  BAS_set_1
015D C  BAS_reset_1
016B C  BAS_check_1
0183 C  BAS_bit_and_addr
0195 B
019D C  BAS_inkey
01C9 C  BAS_CLS
01D3 C  BAS_RANDOM
01D9 C  SUB_cas_put_bit
01E4 C  SUB_cas_blink_star
01ED C  SUB_cas_get_byte
01FA C  SUB_cas_get_bit
021C C  SUB_cas_put_2byte
021F C  SUB_cas_put_byte
023F C  SUB_cas_put_leader_and_sync
024C C  SUB_cas_get_leader_and_sync
0283 B
02AC C  SUB_cas_system_addr
02B2 C  BAS_SYSTEM
0314 C  SUB_cas_get_word
031D C  SUB_system_slash
033A C  SUB_put_chr
0345 ;  calc new pos (AF,DE)
0345 ;  I: -
0345 ;  O: A = new pos value
0345 C  SUB_calc_pos
0358 ;  get keyboard DOS (AF)
0358 ;  I: -
0358 ;  O: A = ASCII code of character
0358 C  SUB_key_get_dos
0361 ;  input a line of max 240 characters (AF,DE,HL)
0361 ;  I: -
0361 ;  O: carry set if break pressed
0361 C  SUB_input_line
0384 ;  wait keyboard DOS (AF)
0384 ;  I: -
0384 ;  O: A = ASCII code of character
0384 C  SUB_key_wait_dos
038B ;  terminate printing (AF)
038B ;  I: -
038B ;  O: DPOS = 0
038B C  SUB_print_term
039C C  SUB_print_char
039C ;  print one character, convert control codes
03C2 C  DCB_in_out_1
03E3 ;  read keyboard (called by DCB)
03E3 C  SUB_kbd_read
0529 C  SUB_prt_status
053C C  SUB_prt_output
0564 C  SUB_print_number
056D C	start2
05CA C  reset_1
0674 C	start1
06CB B
06D2 C  DCB_init
0708 C
0713 C  SNG_sub_y_from_x
0716 C  SNG_add_y_to_x
0809 C  LOG_x
0847 C  SNG_mul_x_by_y
0897 C  SDIV_x_by_10
089D C  DIV_SP_by_HL
08A0 C  DIV_SP_by_x
08A0 C  DIV_BCDE_by_x
08A2 C  SNG_div_x_by_y
093E C  SMUL_x_by_10
0977 C  ABS_x
097B C  TNEG_x
0982 C  SDNEG_x
098A C  SGN_x
09BF C  GET_x_to_BCDE
0A0C C  SNG_cmp_x_with_y
0A39 C  INT_cmp_hl_de
0A78 C  DBL_cmp_x_with_y
0A7F C  CINT_x
0AB1 C  CSNG_x
0ADB C  CDBL_x
0B26 C  FIX_x
0B37 C  INT_x
0BC7 C  INT_sub_x_hl_de
0BD2 C  INT_add_x_hl_de
0BF2 C  INT_mul_x_hl_de
0C5B C  INEG_x
0C77 C  DBL_add_y_to_x
0C70 C  DBL_sub_y_from_x
0DA1 C  DBL_mul_x_by_y
0DE5 C  DBL_div_x_by_y
1364 D  FLO_1D10
136C D  FLO_1D15
1374 D  FLO_1D16
137C D  FLO_0D5
1384 D  FLO_1D16_2
138C B  FIX_1D15
1393 B  FIX_1D14
139A B  FIX_1D13
13A1 B  FIX_1D12
13A8 B  FIX_1D11
13AF B  FIX_1D10
13B6 B  FIX_1D9
13BD B  FIX_1D8
13C4 B  FIX_1D7
13CB B  FIX_1D6
13D2 B  FIX_1E5
13D5 B  FIX_1E4
13D8 B  INT_1E4
13DA B  INT_1E3
13DC B  INT_1E2
13DE B  INT_1E1
13E0 B  INT_1E0
13E2 C  NEG_x_on_ret
13E7 C  SQR_x
13F2 C  EXP_SP
1439 C  EXP_x
1479 B  EXP_coeff_cnt
147A S  EXP_1_7fak
147E S  EXP_1_6fak
1482 S  EXP_1_5fak
1486 S  EXP_1_4fak
148A S  EXP_1_3fak
148E S  EXP_1_2fak
1492 S  EXP_m1_1fak
1496 S  EXP_1
149A C  MATH_taylor_1
14A9 C  MATH_taylor_2
14C9 C  RND_x
14F0 C  RND_0
1541 C  COS_x
1547 C  SIN_x
1593 B  SIN_coeff_cnt
1594 S  PI2_E9_DIV_9
1598 S  PI2_E7_DIV_7
159C S  PI2_E5_DIV_5
15A0 S  PI2_E3_DIV_3
15A4 S  PI2_E1_DIV_1
15A8 C  TAN_x
15BD C  ATN_x
15E3 B  ATN_coeff_cnt
15E4 S  ATN_1_349
15E8 S  ATN_1_62
15EC S  ATN_1_23
15F0 S  ATN_M_1_11
15F4 S  ATN_1_9
15F8 S  ATN_M_1_7
15FC S  ATN_1_5
1600 S  ATN_M_1_3
1604 S  ATN_1
1608 E  BAS_funct_entry
1650 7  BAS_token_table
17A5 7  BAS_funct_table
1822 E  BAS_token_entry
189A B  BAS_op_priority
18A1 E  BAS_type_conv
18AB E  BAS_op_double
18B5 E  BAS_op_single
18BF E  BAS_op_integer
18C9 A  BAS_err2
18C9 +  Next without For
18CB +  SyNtax
18CD +  Return without Gosub
18CF +  Out of Data
18D1 +  Function Call
18D3 +  OVerflow
18D5 +  Out of Memory
18D7 +  Undefined Line
18D9 +  BS ??
18DB +  DD ??
18DD +  division by zero (/0)
18DF +  Illegal Direct
18E1 +  Type Mismatch
18E3 +  Out of Stringspace
18E5 +  LS ??
18E7 +  ST ??
18E9 +  CN ??
18EB +  NR ??
18ED +  RW ??
18EF +  UE ??
18F1 +  Missing Operand
18F3 +  FD ??
18F5 +  SyNtax Error
18F7 ;  this is copied into ram at 4080H...
18F7 C
191C A  MSG_Error
1924 A  MSG_in
1929 A  MSG_READY
1930 A  MSG_Break
1936 C
1936 ;  subroutine for FOR, NEXT and RETURN
1936 ;  get data from basic stack
1936 ;  I: DE = VARPTR of the new loop variable if FOR/NEXT loop
1936 ;     DE = VARPTR of the variable of NEXT
1936 ;     DE = 0000 if no variable at NEXT
1936 ;  O: DE = unchanged
1936 ;     HL = stack pointer to FOR/TO stack + 1 (if Z clear)
1936 ;     HL = stack pointer to FOR/TO stack + 3 (if Z is set)
1B49 C  BAS_NEW
1CA1 C  BAS_FOR
1D91 C  BAS_RESTOR
1DA9 C  BAS_STOP
1DAE C  BAS_END
1DE4 C  BAS_CONT
1DF7 C  BAS_TRON
1DF8 C  BAS_TROFF
1E00 C  BAS_DEFSTR
1E03 C  BAS_DEFINT
1E06 C  BAS_DEFSNG
1E09 C  BAS_DEFDBL
1E7A C  BAS_CLEAR
1EA3 C  BAS_RUN
1EB1 C  BAS_GOSUB
1EC2 C  BAS_GOTO
1EDE C  BAS_RETURN
1F05 C  BAS_DATA
1F07 C  BAS_REM_ELSE
1F21 C  BAS_LET
1F6C C  BAS_ON
1FAF C  BAS_RESUME
1FF4 C  BAS_ERROR
2008 C  BAS_AUTO
2039 C  BAS_IF
2067 C  BAS_LPRINT
206F C  BAS_PRINT
219A C  BAS_INPUT
21EF C  BAS_READ
22B6 C  BAS_NEXT
2490 C  INT_div_x_hl_de
2608 C  BAS_DIM
27D4 C  FRE_x
27F5 C  POS_x
2836 C  STR$_x
28A7 C  SUB_print_hl
2A03 C  LEN_x
2A0F C  ASC_x
2A1F C  CHR$_x
2A61 C  LEFT$_x
2A91 C  RIGHT$_x
2A9A C  MID$_x
2AC5 C  VAL_x
2AEF C  INP_x
2AFB C  BAS_OUT
2B29 C  BAS_LLIST
2B2E C  BAS_LIST
2BC6 C  BAS_DELETE
2BF5 C  BAS_CSAVE
2C1F C  BAS_CLOAD
2CAA C  PEEK_x
2CB1 C  BAS_POKE
2E60 C  BAS_EDIT
3569 B	COLOUR_XLT
3579 C	error_msg_ping
3711 B  COLOUR_XLT_0
3721 B	COLOUR_XLT_1
3731 B	COLOUR_XLT_2
3741 B
37CB C	PRINT_EOF_CR
37E7 C	HEX_DE_2_HL
37EC C	HEX_A_2_HL
37F5 C	NIBBLE_2_HL
3800 B	CRTC_LGR_PAL
3810 B	CRTC_FGR_PAL
3820 B	CAS_TIMING_PAL
3823 B	CRTC_LGR_NTSC
3833 B	CRTC_FGR_NTSC
3843 B	CAS_TIMING_NTSC
3846 C	FCLS
3870 C	CRTC_SET
3873 C	CRTC_SET_A
38B7 C  BGRD
38BB C	NBGRD
3A80 C  BAS_KEYPAD1
3A84 C  BAS_KEYPAD2
3C97 C  C_SWAPNIB
3FA3 C  BAS_SOUND_2
3FE4 C  BAS_BGRD
4000 C  VEC_RST_08
4003 C  VEC_RST_10
4006 C  VEC_RST_18
4009 C  VEC_RST_20
400C C  VEC_RST_28
400F C  VEC_RST_30
4012 C  VEC_RST_38
4015 B  DCB_kbd_type
4016 E  DCB_kbd_entry
4018 B  DCB_kbd_ctrl_modsel
4019 B  CRT_cur_bottom
401A B  CRT_cur_top_flag
401D B  DCB_scr_type
401E E  DCB_scr_entry
401F B  DCB_scr_entry+1
4020 W  DCB_scr_pos
4021 B  DCB_scr_pos+1
4022 B  DCB_scr_cursor
4023 B  DCB_scr_colour
4024 B  DCB_scr_repeat
4025 B  DCB_prt_type
4026 E  DCB_prt_entry
4027 B  DCB_prt_entry+1
4028 B  DCB_prt_page_size
4029 B  DCB_prt_line_count
402D C	DOS_$RET
4030 C	DOS_$EXIT
4033 C  SUB_ill_DCB
4036 B  KEY_old_0
4037 B  KEY_old_1
4038 B  KEY_old_2
4039 B  KEY_old_3
403A B  KEY_old_4
403B B  KEY_old_5
403C B  KEY_old_6
403D B  KEY_old_7
403E B  MEM_unused
4080 C  SUB_SDIV
408E W  USR_address
4090 B  VAL_rnd_factor
4093 C  SUB_INP
4096 C  SUB_OUT
4099 B	KEY_old
409A B  ERR
409B B  DPOS
409C B	out_flag
409D B	scr_width
409E B	tab_max
40A0 W	STR_space
40A2 W	BAS_line_number
40A4 W	BAS_lomem
40A6 B	pos
40A7 W	ptr_line_buffer
40A9 B	flg_input
40AA B	rnd_mantissa
40AB B	rnd_seed
40AE B	dim_flag
40AF B	var_type
40B0 B	flg_dont_tokenize
40B1 W	bas_space_end
40B3 W	str_space_next
40B5 B	str_tab_len_0
40B6 W	str_tab_adr_0
40B8 B	str_tab_len_1
40B9 W	str_tab_adr_1
40BB B	str_tab_len_2
40BC W	str_tab_adr_2
40BE B	str_tab_len_3
40BF W	str_tab_adr_3
40C1 B	str_tab_len_4
40C2 W	str_tab_adr_4
40C4 B	str_tab_len_5
40C5 W	str_tab_adr_5
40C7 B	str_tab_len_6
40C8 W	str_tab_adr_6
40CA B	str_tab_len_7
40CB W	str_tab_adr_7
40CD B	str_tab_len_8
40CE W	str_tab_adr_8
40D0 B	str_tab_len_9
40D1 W	str_tab_adr_9
40D3 B	str_len
40D4 W	str_adr
40D6 W	str_last_str
40D8 W	old_ptz
40DA W	data_line
40DC B	flg_no_array
40DD B	flg_stopped
40DE B	flg_read_input
40DF E  VEC_prg_start
40E1 B	flg_auto
40E2 W  VAL_auto_line
40E4 W  VAL_auto_step
40E6 W	basic_code
40E8 W	basic_stack
40EA W  VAL_basic_erl
40EC W  VAL_basic_dot
40EE W	basic_code0
40F0 W	basic_on_error
40F2 B	flg_basic_on_error
40F3 W  BUF_basic_code
40F5 W  VAL_basic_line
40F7 W	basic_cont
40F9 W	var_space
40FB W	var_space_dim
40FD W	free_mem
40FF W	data
4101 B  DEF_A
4102 B  DEF_B
4103 B  DEF_C
4104 B  DEF_D
4105 B  DEF_E
4106 B  DEF_F
4107 B  DEF_G
4108 B  DEF_H
4109 B  DEF_I
410A B  DEF_J
410B B  DEF_K
410C B  DEF_L
410D B  DEF_M
410E B  DEF_N
410F B  DEF_O
4110 B  DEF_P
4111 B  DEF_Q
4112 B  DEF_R
4113 B  DEF_S
4114 B  DEF_T
4115 B  DEF_U
4116 B  DEF_V
4117 B  DEF_W
4118 B  DEF_X
4119 B  DEF_Y
411A B  DEF_Z
411B B	flg_trace
411C S  X_buff
4126 S  Y_buff
412F B  N_buff
414A B  M_buff
4152 C	DOS_CVI
4155 C	DOS_FN
4158 C	DOS_CVS
415B C	DOS_DEF
415E C	DOS_CVD
4161 C	DOS_EOF
4164 C	DOS_LOC
4167 C	DOS_LOF
416A C	DOS_MKI$
416D C	DOS_MKS$
4170 C	DOS_MKD$
4173 C	DOS_CMD
4176 C	DOS_TIME$
4179 C	DOS_OPEN
417C C	DOS_FIELD
417F C	DOS_GET
4182 C	DOS_PUT
4185 C	DOS_CLOSE
4188 C	DOS_LOAD
418B C	DOS_MERGE
418E C	DOS_NAME
4191 C	DOS_KILL
4194 C	DOS_AMPERSAND
4197 C	DOS_LSET
419A C	DOS_RSET
419D C	DOS_INSTR
41A0 C	DOS_SAVE
41A3 C	DOS_LINE
41A6 C	DOS_error
41A9 C	DOS_USR
41AC C	DOS_cmd_mode
41AF C	DOS_line_input
41B2 C	DOS_line_tokenized
41B5 C	DOS_line_program
41B8 C	DOS_line_inserted
41BB C	DOS_var_clear
41BE C	DOS_prt_done
41C1 C	DOS_dsp_char
41C4 C	DOS_key_running
41C7 C	DOS_RUN
41CA C	DOS_token_PRINT
41CD C	DOS_token_PRINT_N
41D0 C	DOS_new_line
41D3 C	DOS_PRINT
41D6 C	DOS_token_INPUT
41D9 C	DOS_func_MID$
41DC C	DOS_read_input
41DF C	DOS_input_done
41E2 C	DOS_SYSTEM
41E5 B	line_buffer_mark
41E8 B	line_buffer
42F0 B	CRTC_LGR
42F0 +	cursor address low
42F1 +	cursor address high
42F2 +	screen address low
42F3 +	screen address high
42F4 +	cursor bottom line
42F5 +	cursor top line and mode
42F6 +	scan lines per character
42F7 +	CRT mode
42F8 +	vertical sync position
42FA +	vertical displayed
42F9 +	vertical adjust
42FB +	vertical total
42FC +	horizontal length
42FD +	horizontal sync position
42FE +	horizontal displayed
42FF +	horizontal total
4300 B	CRTC_FGR
4300 +	cursor address low
4301 +	cursor address high
4302 +	screen address low
4303 +	screen address high
4304 +	cursor bottom line
4305 +	cursor top line and mode
4306 +	scan lines per character
4307 +	CRT mode
4308 +	vertical sync position
430A +	vertical displayed
4309 +	vertical adjust
430B +	vertical total
430C +	horizontal length
430D +	horizontal sync position
430E +	horizontal displayed
430F +	horizontal total
4310 B  CAS_delay_0
4311 B  CAS_delay_1
4312 B  CAS_delay_in
4313 B  FCOLOUR
4314 B  SCALE
4315 B  PLOT_x
4316 B  PLOT_y
4317 B  SHAPE_mask
4319 B  PAINT_border_2
431A B  PAINT_border_1
431B B  PAINT_colour
431C B  port_ff
431D B  PAINT_border_cnt
431E B  PAINT_x
431F B  PAINT_y
4320 B  PAINT_x_left
4321 B  PAINT_x_right
4322 B
4390 B	colour_xlt
43B6 B	DOS_time_act
4400 A  LGR
E000 B	EXT_rom
E001 C	EXT_rom_entry
F000 B  RAM_col
F028 B  RAM_col+40
F400 B  RAM_fnt
F800 B  KEY_matrix
F801 B  KEY_row_0
F802 B  KEY_row_1
F804 B  KEY_row_2
F808 B  KEY_row_3
F810 B  KEY_row_4
F820 B  KEY_row_5
F840 B  KEY_row_6
F880 B  KEY_row_7
FFE0 B  FDC_motors
FFEC B  FDC_cmd_sta
FFED B  FDC_trk
FFEE B  FDC_sec
FFEF B  FDC_i_o
FFF0 B  FDC_motors
FFFC B  FDC_cmd_sta
FFFD B  FDC_trk
FFFE B  FDC_sec
FFFF B  FDC_i_o
00F8 P  PSG_idx
00F9 P  PSG_val
00FA P  CRT_idx
00FB P  CRT_val
00FF P  PORT_FF
