×   Main Menu ALL The 8BS News Manuals (New menu) Links Worth a Look Tools Disc and Basic Webring Site Map 8BS Guestbook Old Guest Book Me The Barnsley Rovers   
8-Bit Software

The BBC and Master Computer Public Domain Library


BASIC ROM Routines

MENU:
  Introduction/News
  Routines listed in Address order
  Routines listed by Category
  BASIC IV


BASIC4r32 Routines (listed in order of Memory Address)

Routine Name

Start Address

Address Range

Comments

BASIC ROM header

8000

8000-802B

BASIC ROM Service Startup

802C

802C-80DC

BASIC ROM Startup Initialisations

80E7

802B-8074

Lookup Subroutine Name in FN/PROC Variable Lookup Table

8075

8075-8084

Get Address of Variable

8085

8085-80CC

Search for Program Line

80CD

80CD-80F8

Integer Division

80F9

80F9-8171

Convert Integer to Floating-Point

8185

8185-81CB

Also includes: 81E0-81E1

Set FWA to 1-byte value

81D5

81D5-81DF

Normalise FWA#2

81E2

81E2-81F6

Also includes: 81CC-81D4

Normalise FWA#1

81F7

81F7-8241

Convert Floating-Point to Integer

8242

8242-826E

Also includes: 8272-8274; 827E-82BC; 82BD-82BF; 82C0-82C3

Integer Reverse Order Complement

82C4

82C4-82DF

Split FWA (into Integer/Fractional part)

82E0

82E0-830C

Also includes: 8275-827D

Calculate next Random Number Seed value

831E

831E-8348

Copy FWB to FWA

8349

8349-8367

Floating-point addition

8368

8368-8455

BASIC Keyword List

8456

8456-8768

BASIC Execution Address List

8769

8769-884C

'[' Begin Assembly

8920

891A-89D3

Assemble Assembly instruction/statement

89EB

89D4-8CD6

Also includes: 884D-891B

Replace untokenised ASCII value with a 1-byte token

8CEB

8CEB-8D03

Tokenise Line Number

8D04

8D04-8D83

Check for Variable name character or digit (in A)

8D84

8D84-8D9A

Increment [and read] pointer (&37, &38)

8DA0

8DA0-8DAE

Tokenise Command Line

8DB2

8DAF-8ED4

Also includes: 8D9B-8D9F

Next non-space Char PTRB

8ED5

8ED5-8EDF

Also includes: 8EEB-8EF0

Next non-space Char PTRA

8EE0

8EE0-8EEA

Also includes: 8CD7-8CEA

CHAIN

8EFB

8EFB-8EFF

OLD

8F00

8F00-8F11

RUN

8F12

8F12-8F1F

LOAD

8F20

8F20-8F24

END

8F25

8F25-8F2C

BASIC ROM Startup initialisations (part 2)

8F2D

8F2D-8F7C

NEW

8F7D

8F7D-8F82

Also includes: BEFE-BF13

Prompt for command line and execute the entered command(s)

8F83

8F83-8FA3

Execute '*'-Command

8FA4

8FA4-8FAD

Execute next command line / program statement

8FAE

8FAE-9049

LET

904A

904A-905F

Also includes: 9072-9085

'=' Return from a Function Call (FN)

9060

9060-9071

STOP

9086

9086-9088

Set String variable

90AB

90AB-9140

Also includes: BE25-BE32

PRINT#

9141

9141-918C

Also includes: BA3C-BA57

PRINT

918D

918D-9229

Also includes: 927A-9293

(PRINT) TAB(

9241

922A-925A

Also includes: 9840-9844

(PRINT) SPC

925B

925B-9266

(PRINT) quote (')

9267

9267-926E

Get Result of expression from BASIC Text pointer A & convert to Integer

926F

926D-9279

CALL

92BE

92BE-9313

DELETE

9317

9314-934C

RENUMBER

9384

934D-9488

AUTO

9489

9489-94B8

DIM

9534

9534-9604

Also includes: 94B9-9502, 9AF6-9B1B, BC43-BC50, BEEF-BEFD

HIMEM=

960F

960F-961F

Also includes: 96B9-96BD

LOMEM=

9620

9620-9633

PAGE=

9634

9634-963D

CLEAR

963E

963E-9645

TRACE

9646

9646-9678

TIME=

9679

9679-968D

TIME$=

968E

968E-96A3

Get Integer result of expression and check for closing bracket

96A7

96A7-96AB

Get Integer result of expression

96AF

96AC-96B3

Also includes: 8EF1-8EF5

Get Integer value at PTR B

96B4

96B4-96B8

Check if Integer and Convert if Float

96BE

96BE-96D9

Get & Check Float value

96DA

96D7-96E3

PROC

96E4

96E4-96FA

LOCAL

9703

96FB-9731

GCOL

9741

9741-9754

COLOUR

9755

9755-975E

MODE

975F

975F-97A1

MOVE

97A2

97A2-97A5

DRAW

97A6

97A6-97B0

PLOT

97B1

97B1-97DF

CLG

97E0

97E0-97E6

CLS

97E7

97E7-97F3

REPORT

97F4

97F4-9807

VDU

980D

9808-983F

Create Lookup Table reference for Subroutine Name

9845

9845-9853

Create new variable name in Variable Pointer table

9854

9854-9882

Allocate space for new variable

9883

9883-98AA

Evaluate variable name & Create if new variable

98AE

98AB-98BF

'?' and '!' address peek/poke operators

98D1

98D1-98DB

'$' address peek/poke operator

98DC

98DC-98EA

Evaluate Variable name and return value address

9909

9909-99AD

Also includes: 98C1-98D0

'!' and '?' address modifier operators

99AE

99AE-99D4

Get address of specified Array element

99FE

99FE-9AE9

Also includes: 9503-952B

Detokenise the requested Line Number and Set IWA to the Line Number value

9B1C

9B1C-9B45

Check for '=', evaluate expression & check end of statement

9B52

9B52-9B5F

Also includes: 9B8E-9B95

ENDPROC

9B9A

9B9A-9BA5

Check for End of Statement

9BA6

9BA6-9BCE

Also includes: 9B96-9B99

Check & skip end of program line

9BCF

9BCF-9C04

IF

9C08

9C05-9C4A

Display current Line number to screen [for TRACE]

9C4B

9C4B-9C64

Compare Float values

9C82

9C65-9CC5

Compare Integer values

9CC9

9CC6-9D01

Compare String values

9D02

9D02-9D2E

Expression Handler

9D3B

9D2F-9D4B

Also includes: 9D7B-9D88, 9DA9-9DB4, 9E4C-9E57, 9FC1-9FDA, A00F-A026

'OR' Operator

9D4C

9D4C-9D65

'EOR' Operator

9D66

9D66-9D7A

'AND' Operator

9D89

9D89-9DA8

'=' and other relational operators

9DB5

9DB5-9DCC

'<' Operator

9DCD

9DCD-9DE0

'<=' Operator

9DE1

9DE1-9DEB

'<>' Operator

9DEC

9DEC-9DF4

'>' Operator

9DF5

9DF5-9E06

'>=' Operator

9E07

9E07-9E0F

String Addition

9E22

9E22-9E4B

'+' Operator

9E58

9E58-9E64

Also includes: 9E91-9EBC

Integer Addition

9E65

9E65-9E90

Also includes: 9E4F-9E57

'-' Operator

9EBD

9EBD-9EC9

Also includes: 9EE7-9F11; ACC7-ACD6

Integer Subtraction

9ECA

9ECA-9EE6

'*' Operator

9F3B

9F12-9F63

Integer Multiplication

9F64

9F64-9FDA

'/' Operator

9FDB

9FDB-9FF4

Integer MOD routine

9FF5

9FF5-9FFC

Integer DIV routine

9FFD

9FFD-A00E

'^' Operator (raise to Power)

A027

A027-A07F

Print Line Number on screen

A085

A081-A0C9

Also includes: 8021-802A

Multiply FWA Mantissa by 10

A26C

A26C-A2BB

NUMASC (convert Numeric value to ASCII value)

A118

A0CA-A2D9

Also Includes:

ASCNUM: Extract Number at PTRB

A2E1

A2DA-A35C

ASCNUM: Handle Exponental values & complete number conversion

A35D

A35D-A3F1

Floating-point Sign

A3F2

A3F2-A40A

Copy FWA to FWB

A40B

A40B-A427

Floating-point multiply by 10

A436

A436-A477

Also Includes: A428-A435

Floating-point divide by 10

A478

A478-A4DF

Unpack FP Variable to FWB

A4E0

A4E0-A50C

Store FWA to Temporary Variable

A50D

A50D-A518

Pack FWA to Variable

A519

A519-A538

Unpack FP Variable to FWA

A541

A539-A56F

Clear FWB

A570

A570-A57E

TAN

A59B

A59B-A5BD

Raise FWA to the power of the integer value in A

A5BE

A5BE-A5E1

Floating-Point Reciple

A5E9

A5E9-A5ED

Also Includes: A589-A591

Floating-Point Division Entry Point

A5EE

A5EE-A5F9

Floating-Point Division

A5FA

A5FA-A689

Also includes: &A5E5 to &A5E8

Floating-Point Subtract Entry Point

A68A

A68A-A68C

Floating-Point Addition Entry Point

A68D

A68D-A694

Round FWA Mantissa to 4 bytes

A695

A695-A6A5

Also includes &A6AB to &A6B3.

Floating-Point Multiply Entry Point

A6A6

A6A6-A6AA

Clear FWA

A6B4

A6B4-A6C4

Floating-Point Multiplication

A6CF

A6CF-A745

LN

A746

A746-A7B4

SQR

A7B5

A7B5-A860

Evaluate continued-fraction expansions Series

A861

A861-A89B

Also includes: A57F-A588 and A592-A59A

ACS

A89C

A89C-A8A0

ASN

A8A1

A8A1-A8C2

ATN

A8C3

A8C3-A90C

SIN

A90D

A90D-A90D

COS

A90E

A90E-A9AC

RAD

A9C8

A9C8-A9CE

LOG

A9CF

A9CF-A9D7

DEG

A9D8

A9D8-A9DE

EXP

A9DF

A9DF-AA11

RND

AA73

AA1E-AA7F

Load Integer from Zero Page Address

AA80

AA80-AA92

NOT

AA93

AA93-AAA2

POS

AAA3

AAA3-AAA8

USR

AAA9

AAA9-AABB

VPOS

AABC

AABC-AAC4

EXT

AAC5

AAC5-AAC8

=PTR

AAC9

AAC9-AAD6

BGET

AAD7

AAD7-AADE

OPENIN

AADF

AADF-AAE2

OPENOUT

AAE3

AAE3-AAE6

OPENUP

AAE7

AAE7-AAFE

PI

AAFF

AAFF-AB04

EVAL

AB05

AB05-AB39

VAL

AB49

AB46-AB4D

Ascnum (ASCII String to Binary Number)

AB4E

AB4E-AB88

Also includes:AB3A-AB45

INT

AB8A

AB8A-ABB2

Also includes: 830D-831D

ASC

ABB3

ABB3-ABC1

INKEY

ABC2

ABC2-ABCB

Also includes: AA12-AA1D

EOF

ABCF

ABCF-ABDA

TRUE

ABDB

ABDB-ABDC

FALSE (Clear IWA)

ABE8

ABDD-ABEB

SGN

ABF5

ABEC-AC0D

POINT(

AC0E

AC0E-AC35

INSTR(

AC36

AC36-ACB3

ABS

ACB7

ACB4-ACBD

Also includes: ACC4-ACC6

Integer Positive

ACBE

ACBE-ACC3

Floating-Point Compliment

ACCA

ACCA-ACD6

Compliment Result

ACD7

ACD7-ACDD

Integer Compliment

ACDE

ACDE-ACF7

Extract next field

ACF8

ACF8-AD18

Extract String

AD19

AD11-AD35

Evaluate Variable/Value/BASIC Function/Open Bracket

AD36

AD36-AD8B

Evaluate expression and check for closing bracket

ADAC

ADAC-ADB6

Extract Hex Integer

ADB7

ADB7-ADEB

ADVAL

ADEC

ADEC-ADF8

TOP

ADF9

ADF9-AE07

=PAGE

AE08

AE08-AE0D

LEN

AE11

AE0E-AE17

IWA = 8-bit or 16-bit Integer

AE1A

AE18-AE24

COUNT

AE25

AE25-AE28

=LOMEM

AE29

AE29-AE2E

=HIMEM

AE2F

AE2F-AE34

ERL

AE35

AE35-AE3A

ERR

AE3B

AE3B-AE3E

GET

AE3F

AE3F-AE43

=TIME

AE44

AE44-AE56

=TIME$

AE57

AE57-AE68

GET$

AE69

AE69-AE72

Also includes: AE8F-AE93

LEFT$(

AE73

AE73-AE73

RIGHT$(

AE74

AE74-AEB2

Also includes: 96A4-96A6

INKEY$

AEB3

AEB3-AEBE

MID$(

AEC5

AEBF-AF1B

STR$

AF1C

AF1C-AF46

STRING$

AF47

AF47-AF82

Add subroutine name to FN/PROC variable lookup table

AF97

AF83-B00B

FN

B017

B017-B067

Call Subroutine

B068

B068-B180

Load Variable & Push its value to the BASIC Stack

B181

B181-B19F

Load Variable B1A0

B1A0-B1A9

Load IWA with Integer from Address [iin] B1AA

B1AA-B1C1

Load IWA with 1-byte Integer value B1C2

B1C2-B1C6

Load FWA with Float Variable (ain) B1C7

B1C7-B1F6

Load SWA with String Value B1F7

B1F7-B22E

CHR$ B22F

B22F-B236

BASIC Error handler B2B2

B237-B2A5

Reset ON ERROR code pointer B2A6

B2A6-B2C7

SOUND

B2C8

B2C8-B2EB

ENVELOPE

B2EC

B2EC-B316

WIDTH

B317

B317-B324

Set Numeric variable

B32B

B325-B346

Also includes: B360-B388

Save Integer to Address B347

B347-B35F

EDIT B393

B389-B399

LIST B39A

B39A-B3DC

Also: B3F3-B4F0
LISTO B3DD

B3DD-B3F2

NEXT

B4F1

B4F1-B5F7

FOR

B618

B618-B6D8

GOSUB

B6D9

B6D9-B6F2

RETURN

B707

B707-B71C

GOTO

B71D

B71D-B738

ON

B75B

B739-B829

Get Line Number & find Program Address of the Line Number

B82A

B82A-B83B

INPUT#

B847

B83C-B8B1

INPUT

B8B6

B8B2-B94C

Also includes: 9299-92BD, BA70-BA91

RESTORE

B94D

B94D-B974

READ

B97D

B975-B9F0

Also includes: BA13-BA16

UNTIL

BA17

BA17-BA3B

REPEAT

BA58

BA58-BA6F

Start new output line

BA92

BA92-BA97

Remove Line Number (specified in the IWA) from the Program

BA98

BA98-BAEA

Tokenise Command Line and Insert Line into Program

BAEB

BAEB-BBAB

Initialise Page 7 & reset Variable pointers, etc...

BBAC

BBAC-BBE7

Also includes: BF14 to BF23

Pop Float from Stack (to &4A,&4B)

BBE8

BBE8-BBF9

Push FWA to Stack

BBFA

BBFA-BC21

Push Integer to BASIC Stack BC26

BC22-BC42

Push String to Stack

BC51

BC51-BC69

Set Variable to value from the BASIC Stack

BC6A

BC6A-BCD1

Pop String from Stack

BCD2

BCD2-BCE5

Pop Integer from BASIC Stack BCE6

BCE6-BD05

Pop Integer from BASIC Stack (Zp) BD08

BD06-BD1D

Check for Stack clash with Heap BD1E

BD1E-BD30

Also includes: BD34-BD36

Output ASCII character or BASIC Token (in ASCII text) to the screen BD37

BD37-BD6B

Also includes: BD34-BD36

Output character to the screen BD92

BD6C-BDC5

Also includes: BD31-BD36

Save Integer to Zero Page Address BDC6

BDC6-BDD6

Load/Save named file BDD7

BDD7-BDE4

Check Program can be read correctly BDE5

BDE5-BE24

Also includes BECF-BEE1
Get Filename and set parameter block Filename and Load address BE41

BE33-BE54

SAVE BE55

BE55-BE86

OSCLI BE87

BE87-BE92

EXT = BE93

BE93-BE96

PTR = BE97

BE97-BEAD

CLOSE BEAE

BEAE-BEBC

BPUT BEBD

BEBD-BECE

Read byte from I/O processor memory location (at the address contained in the IWA) BEE2

BEE2-BEEE

Floating Point Constant Table BF24

BF24-BFFA

Detect if Tube is present BF66

BF66-BF70

Signature BFFB

BFFB-BFFF

Error Messages

Character Set

Memory Map

Glossary

Disassembly
8000 to 9000 HTML TEXT CSV
9000 to A000 HTML TEXT CSV
A000 to B000 HTML TEXT CSV
B000 to C000 HTML TEXT CSV

Reference Disc images


 

 Back to 8BS
Or
Return To On Line Magazine