Browse Source

Upgrade BBCBASIC to v5

work v3.5.0-dev.44
Wayne Warthen 2 years ago
parent
commit
a7e767d0b7
  1. 1
      Binary/Apps/Clean.cmd
  2. 2
      Binary/Apps/Makefile
  3. 4
      Doc/CPM/ReadMe.txt
  4. 1
      Doc/ChangeLog.txt
  5. 23
      Source/Apps/BBCBASIC/Build.cmd
  6. 9
      Source/Apps/BBCBASIC/Clean.cmd
  7. 11
      Source/Apps/BBCBASIC/Makefile
  8. 1010
      Source/Apps/BBCBASIC/asmb.z80
  9. 86
      Source/Apps/BBCBASIC/bbcbasic.txt
  10. 1494
      Source/Apps/BBCBASIC/cmos.z80
  11. 69
      Source/Apps/BBCBASIC/data.z80
  12. 222
      Source/Apps/BBCBASIC/dist.z80
  13. 2587
      Source/Apps/BBCBASIC/eval.z80
  14. 3274
      Source/Apps/BBCBASIC/exec.z80
  15. 64
      Source/Apps/BBCBASIC/hook.z80
  16. 2237
      Source/Apps/BBCBASIC/main.z80
  17. 2267
      Source/Apps/BBCBASIC/math.z80
  18. 1
      Source/Apps/Build.cmd
  19. 1
      Source/Apps/Clean.cmd
  20. 2
      Source/Apps/Makefile
  21. BIN
      Source/Images/Common/UTILS/BBCBASIC.COM
  22. 13
      Source/Images/Common/UTILS/BBCDIST.SUB
  23. 2
      Source/Images/hd_bp.txt
  24. 2
      Source/Images/hd_cpm22.txt
  25. 2
      Source/Images/hd_cpm3.txt
  26. 2
      Source/Images/hd_nzcom.txt
  27. 2
      Source/Images/hd_qpm.txt
  28. 2
      Source/Images/hd_zpm3.txt
  29. 2
      Source/Images/hd_zsdos.txt
  30. 2
      Source/ver.inc
  31. 2
      Source/ver.lib

1
Binary/Apps/Clean.cmd

@ -8,5 +8,6 @@ if exist *.hlp del *.hlp
if exist Tunes\*.pt? del Tunes\*.pt? if exist Tunes\*.pt? del Tunes\*.pt?
if exist Tunes\*.mym del Tunes\*.mym if exist Tunes\*.mym del Tunes\*.mym
if exist Tunes\*.vgm del Tunes\*.vgm if exist Tunes\*.vgm del Tunes\*.vgm
if exist bbcbasic.txt del bbcbasic.txt
pushd Test && call Clean || exit /b 1 & popd pushd Test && call Clean || exit /b 1 & popd

2
Binary/Apps/Makefile

@ -8,4 +8,4 @@ all::
mkdir -p Tunes mkdir -p Tunes
clean:: clean::
@rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm
@rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm bbcbasic.txt

4
Doc/CPM/ReadMe.txt

@ -7,8 +7,8 @@
*********************************************************************** ***********************************************************************
This directory ("Doc/CPM") is part of the RomWBW System Software This directory ("Doc/CPM") is part of the RomWBW System Software
distribution archive. It contains documentation for the CP/M
operating system components of the system.
distribution archive. It contains documentation for the CP/M and
CP/M work-alike operating system components of the system.
CPM Manual ("CPM Manual.pdf") CPM Manual ("CPM Manual.pdf")

1
Doc/ChangeLog.txt

@ -15,6 +15,7 @@ Version 3.5
- WBW: Auto restore TMS video on user reset (CP/M warm boot) - WBW: Auto restore TMS video on user reset (CP/M warm boot)
- L?B: Added support for NABU w/ RomWBW Option Board - L?B: Added support for NABU w/ RomWBW Option Board
- M?P: Reorganization of Doc directory introducing subfolders - M?P: Reorganization of Doc directory introducing subfolders
- WBW: Upgraded BBCBASIC to v5.00
Version 3.4 Version 3.4
----------- -----------

23
Source/Apps/BBCBASIC/Build.cmd

@ -0,0 +1,23 @@
@echo off
setlocal
set TOOLS=..\..\..\Tools
set PATH=%TOOLS%\zxcc;%PATH%
set CPMDIR80=%TOOLS%/cpm/
zxcc z80asm -dist/FM
zxcc z80asm -main/FM
zxcc z80asm -exec/FM
zxcc z80asm -eval/FM
zxcc z80asm -asmb/FM
zxcc z80asm -cmos/FM
zxcc z80asm -math/FM
zxcc z80asm -hook/FM
zxcc z80asm -data/FM
zxcc slrnk -/v,/a:0100,dist,main,exec,eval,asmb,math,hook,cmos,/p:4B00,data,bbcbasic/n,/e
copy /Y bbcbasic.com ..\..\..\Binary\Apps\ || exit /b
copy /Y bbcbasic.txt ..\..\..\Binary\Apps\ || exit /b

9
Source/Apps/BBCBASIC/Clean.cmd

@ -0,0 +1,9 @@
@echo off
setlocal
if exist *.com del *.com
if exist *.lst del *.lst
if exist *.hex del *.hex
if exist *.prn del *.prn
if exist *.rel del *.rel
if exist *.sym del *.sym

11
Source/Apps/BBCBASIC/Makefile

@ -0,0 +1,11 @@
OBJECTS = bbcbasic.com
DOCS = bbcbasic.txt
DEST = ../../../Binary/Apps
DOCDEST = ../../../Binary/Apps
TOOLS = ../../../Tools
OTHERS = *.rel
include $(TOOLS)/Makefile.inc
bbcbasic.com: dist.rel main.rel exec.rel eval.rel asmb.rel cmos.rel math.rel hook.rel data.rel
$(ZXCC) SLRNK -/V,/A:0100,DIST,MAIN,EXEC,EVAL,ASMB,MATH,HOOK,CMOS,/P:4B00,DATA,BBCBASIC/N,/E

1010
Source/Apps/BBCBASIC/asmb.z80

File diff suppressed because it is too large

86
Source/Images/Common/UTILS/BBCBASIC.TXT → Source/Apps/BBCBASIC/bbcbasic.txt

@ -1,3 +1,20 @@
This is a RomWBW HBIOS adaptation of BBCBASIC v5.00. The
cursor and screen management assumes the use of an ANSI/VT-100 terminal
which is generally correct for RomWBW. Support for a hardware system
timer is also implemented. If your system does not have a hardware
timer, the TIME function will always return 0 and the timeout
parameter of the INKEY(n) function will not be observed (will never
timeout).
What follows is some basic information on BBCBASIC from the
distribution. Note that it starts with the v3.00 information and
later on provides information on the changes in v5.00.
-- WBW 1:15 PM 5/30/2024
BBC BASIC (Z80) BBC BASIC (Z80)
Generic CP/M Version 3.00 Generic CP/M Version 3.00
@ -367,3 +384,72 @@
200 Close error 255 CP/M error 200 Close error 255 CP/M error
204 Bad name 204 Bad name
 
New features in BBC BASIC (Z80) version 5.00, May 2024:
1. BASIC V statements
1.1 WHILE...ENDWHILE
1.2 Multi-line IF...THEN...ELSE...ENDIF
1.3 CASE...WHEN...OTHERWISE...ENDCASE
1.4 LOCAL DATA / RESTORE DATA
1.5 ON ERROR LOCAL / RESTORE ERROR
1.6 DIM var LOCAL size
1.7 ERROR err, message$
1.8 RESTORE +n
1.9 SWAP var1,var2
1.10 BPUT #file,string$[;]
1.11 QUIT
2. BASIC V functions
2.1 DIM(array()[,sub])
2.2 END (pointer to free space)
2.3 REPORT$
2.4 Binary constants
2.5 LEFT$ & RIGHT$ with last parameter omitted
2.6 MOD(array)
2.7 SUM(array)
2.8 SUMLEN(array)
2.9 GET$#file
3. BASIC V whole array operations
3.1 Pass a whole array to a FN/PROC
3.2 Pass a whole array to CALL
3.3 Whole array assignment
3.4 Whole array arithmetic *
3.5 Array dot-product operator
3.6 Array initialisation lists
3.7 Array compound assignment (+= etc.)
3.8 Make a whole array LOCAL
3.9 DIM a LOCAL array (on the stack) +
* String array expressions A$() = B$() + C$() are not currently supported.
+ LOCAL string arrays should be initialised to their maximum needed length
to eliminate the risk of a memory leak each time the PROC/FN is called:
LOCAL a$() : DIM a$(size%) : a$() = STRING$(max%, "a") : a$() = ""
4. Miscellaneous BASIC V features
4.1 Bit-shifts <<, >>, >>>
4.2 Floating-point indirection (|)
4.3 RETURNed parameters from FN/PROC
4.4 Compound assignment (+=, -=, *=, /= etc.)
4.5 Assigning to a sub-string: LEFT$()=, MID$()= , RIGHT$()=
4.6 Hooks for CIRCLE,ELLIPSE,FILL,LINE,MOUSE,ORIGIN,RECTANGLE,TINT,SYS,WAIT
4.7 Hooks for WIDTH function, TINT function, MODE function
5. Extensions to Acorn's BASIC V, compatible with BB4W, BBCSDL and BBCTTY
5.1 EXIT REPEAT / WHILE / FOR [var]
5.2 Address-of operator ^
5.3 Byte variables and arrays (& suffix)
5.4 'BY len' and 'TO term' qualifiers to GET$#file
5.5 ELSE IF <condition> THEN; (trailing semicolon)
5.6 == synonymous with = in comparisons
5.7 DIM a global array inside a FN/PROC (use RETURN)
Note: The token for PUT has changed from &CE in version 3 to &0E in version 5.
If this token is present in existing programs it will list as ENDWHILE rather
than PUT, and the programs will need to be modified to restore functionality.

1494
Source/Apps/BBCBASIC/cmos.z80

File diff suppressed because it is too large

69
Source/Apps/BBCBASIC/data.z80

@ -0,0 +1,69 @@
TITLE BBC BASIC (C) R.T.RUSSELL 1981-2024
NAME ('DATA')
;
;RAM MODULE FOR BBC BASIC INTERPRETER
;FOR USE WITH VERSION 5.0 OF BBC BASIC
;(C) COPYRIGHT R.T.RUSSELL 1981-2024
;
GLOBAL ACCS
GLOBAL BUFFER
GLOBAL ONERSP
GLOBAL LIBASE
GLOBAL PAGE
GLOBAL LOMEM
GLOBAL FREE
GLOBAL HIMEM
GLOBAL RANDOM
GLOBAL COUNT
GLOBAL WIDTH
GLOBAL ERL
GLOBAL ERR
GLOBAL ERRTRP
GLOBAL ERRTXT
GLOBAL TRACEN
GLOBAL AUTONO
GLOBAL INCREM
GLOBAL LISTON
GLOBAL DATPTR
GLOBAL FNPTR
GLOBAL PROPTR
GLOBAL STAVAR
GLOBAL OC
GLOBAL PC
GLOBAL DYNVAR
GLOBAL CURLIN
GLOBAL USER
;
;n.b. ACCS, BUFFER & STAVAR must be on page boundaries.
;
ACCS: DEFS 256 ;STRING ACCUMULATOR
BUFFER: DEFS 256 ;STRING INPUT BUFFER
STAVAR: DEFS 27*4 ;STATIC VARIABLES
OC EQU STAVAR+15*4 ;CODE ORIGIN (O%)
PC EQU STAVAR+16*4 ;PROGRAM COUNTER (P%)
DYNVAR: DEFS 54*2 ;DYN. VARIABLE POINTERS
FNPTR: DEFS 2 ;DYN. FUNCTION POINTER
PROPTR: DEFS 2 ;DYN. PROCEDURE POINTER
;
PAGE: DEFS 2 ;START OF USER PROGRAM
LOMEM: DEFS 2 ;START OF DYN. STORAGE
FREE: DEFS 2 ;FIRST FREE-SPACE BYTE
HIMEM: DEFS 2 ;FIRST BYTE ABOVE STACK
LIBASE: DEFS 2 ;START OF FIRST LIBRARY
;
TRACEN: DEFS 2 ;TRACE FLAG AND NUMBER
AUTONO: DEFS 2 ;AUTO FLAG AND NUMBER
ERRTRP: DEFS 2 ;ON ERROR STMT POINTER \
ONERSP: DEFS 2 ;ON ERROR LOCAL STKPTR /
ERRTXT: DEFS 2 ;ERROR MESSAGE POINTER
DATPTR: DEFS 2 ;DATA POINTER
ERL: DEFS 2 ;LINE NO OF LAST ERROR
CURLIN: DEFS 2 ;POINTER TO CURRENT LINE
RANDOM: DEFS 5 ;RANDOM NUMBER
COUNT: DEFS 1 ;PRINT POSITION
WIDTH: DEFS 1 ;PRINT WIDTH
ERR: DEFS 1 ;ERROR NUMBER
LISTON: DEFS 1 ;LISTO & OPT FLAG
INCREM: DEFS 1 ;AUTO INCREMENT
;
USER: END

222
Source/Images/Common/UTILS/BBCDIST.MAC → Source/Apps/BBCBASIC/dist.z80

@ -1,7 +1,8 @@
TITLE BBCDIST.Z80 (C) R.T.RUSSELL 1982
TITLE BBCDIST.Z80 (C) R.T.RUSSELL 1982-2024
NAME ('DIST3')
; ;
;BBC BASIC (Z80) - CP/M VERSION 2.30 & 3.00
;(C) COPYRIGHT R.T.RUSSELL, 1982.
;BBC BASIC (Z80) - CP/M VERSION 2.20 & 3.00
;(C) COPYRIGHT R.T.RUSSELL, 1982-2024.
;ALL RIGHTS RESERVED. ;ALL RIGHTS RESERVED.
; ;
;THIS PROGRAM ALLOWS THE USER TO ADAPT BBC BASIC TO THE ;THIS PROGRAM ALLOWS THE USER TO ADAPT BBC BASIC TO THE
@ -13,11 +14,14 @@
;PLEASE NOTE THAT A Z80 PROCESSOR AND CP/M VERSION 2.2 ;PLEASE NOTE THAT A Z80 PROCESSOR AND CP/M VERSION 2.2
;OR LATER ARE REQUIRED. ;OR LATER ARE REQUIRED.
; ;
;R.T.RUSSELL, 11-03-1984, 03-05-1989
;ALTERNATE REGISTERS SAVED FOR BDOS CALL, 04-06-2000
;R.T.RUSSELL, 11-03-1984, 03-05-1989, 12-05-2024
; ;
CPM EQU 5 CPM EQU 5
COLD EQU 200H COLD EQU 200H
;
CR EQU 0DH
LF EQU 0AH
ESC EQU 1BH
; ;
GLOBAL CLRSCN GLOBAL CLRSCN
GLOBAL PUTCSR GLOBAL PUTCSR
@ -26,14 +30,18 @@ COLD EQU 200H
GLOBAL GETIME GLOBAL GETIME
GLOBAL GETKEY GLOBAL GETKEY
GLOBAL BYE GLOBAL BYE
GLOBAL BEGIN
; GLOBAL BDOS
;
; EXTRN PRTDEC16
; ;
ASEG
ORG 100H
;ASEG
;ORG 100H
; ;
;JUMP TABLE - BASIC makes calls to hardware-dependent ;JUMP TABLE - BASIC makes calls to hardware-dependent
;features via this table: ;features via this table:
; ;
JP INIT
BEGIN: JP INIT
CLRSCN: JP CLS ;CLEAR SCREEN CLRSCN: JP CLS ;CLEAR SCREEN
PUTCSR: JP PCSR ;SET CURSOR POSN. PUTCSR: JP PCSR ;SET CURSOR POSN.
GETCSR: JP GCSR ;READ CURSOR POSN. GETCSR: JP GCSR ;READ CURSOR POSN.
@ -42,30 +50,33 @@ GETIME: JP GTIME ;READ ELAPSED TIME
GETKEY: JP INKEY ;READ KEY (TIME LIMIT) GETKEY: JP INKEY ;READ KEY (TIME LIMIT)
BYE: JP REBOOT ;RETURN TO CP/M BYE: JP REBOOT ;RETURN TO CP/M
; ;
;THE CODE WHICH FOLLOWS IS A SKELETON VERSION SUITABLE
;FOR ANY CP/M SYSTEM. IT HAS BEEN CONFIGURED FOR A VT100 TO SOME DEGREE
;BY PETER SCHORN.
;BDOS - Save the IX and IY registers and before performing a
; CP/M function call.
;
BDOS: PUSH IX
PUSH IY
CALL CPM
POP IY
POP IX
RET
; ;
PRSTR EQU 9
;INIT - Perform hardware initialisation (if any). ;INIT - Perform hardware initialisation (if any).
; ;
INIT: LD A,2
INC A
LD DE,NOTZ80
JP PE,FAIL
LD C,12
CALL BDOS
OR A
LD DE,NOTV2
JP NZ,COLD
FAIL: LD C,PRSTR
INIT: LD HL,40H ;CPM/HBIOS MARKER LOC
LD A,'W'
CP (HL)
JR NZ,FAIL
INC HL
LD A,NOT 'W'
CP (HL)
JR NZ,FAIL
JP COLD
FAIL: LD DE,NOTHB
LD C,9
CALL BDOS CALL BDOS
RST 0 RST 0
; ;
NOTZ80: DEFB 'Wrong processor$'
NOTV2: DEFB 'Wrong CP/M version$'
NOTHB: DEFB 'CP/M w/ HBIOS required$'
; ;
;REBOOT - Switch off interrupts and return to CP/M ;REBOOT - Switch off interrupts and return to CP/M
; ;
@ -75,31 +86,34 @@ REBOOT: RST 0
; Outputs: DEHL = elapsed time (centiseconds) ; Outputs: DEHL = elapsed time (centiseconds)
; Destroys: A,D,E,H,L,F ; Destroys: A,D,E,H,L,F
; ;
GTIME: LD DE,0
LD HL,0
RET
GTIME: JR TICKS
; ;
;PTIME - Load elapsed-time clock. ;PTIME - Load elapsed-time clock.
; Inputs: DEHL = time to load (centiseconds) ; Inputs: DEHL = time to load (centiseconds)
; Destroys: A,D,E,H,L,F ; Destroys: A,D,E,H,L,F
; ;
PTIME: RET
PTIME:
LD BC,0F9D0H
SRL D
RR E
RR H
RR L
RST 08
RET
; ;
;CLS - Clear screen for VT100.
; Destroys: A,D,E,H,L,F
; Get OS elapsed-time clock
; Outputs: DEHL = time (centiseconds)
; Destroys: A,B,C,D,E,H,L,F
; ;
CLS: PUSH BC ; save BC
LD C,PRSTR ; command for output string
LD DE,CLSSTR ; start address of string
CALL BDOS ; output to terminal
POP BC ; restore BC
TICKS: LD BC,0F8D0H
RST 08
SLA L
RL H
RL E
RL D
RET RET
CLSSTR: DEFB 27,'[2J$' ; VT100 string for clear screen
; ;
;INKEY - Sample keyboard with specified wait. ;INKEY - Sample keyboard with specified wait.
; This version uses a simple software timing loop.
; Modify to use hardware/interrupt timer if available.
; Inputs: HL = Time to wait (centiseconds) ; Inputs: HL = Time to wait (centiseconds)
; Outputs: Carry reset indicates time-out. ; Outputs: Carry reset indicates time-out.
; If carry set, A = character typed. ; If carry set, A = character typed.
@ -107,52 +121,64 @@ CLSSTR: DEFB 27,'[2J$' ; VT100 string for clear screen
; ;
INKEY: PUSH BC INKEY: PUSH BC
PUSH HL PUSH HL
CALL TICKS
POP DE
ADD HL,DE
WAIT: PUSH HL
LD C,6 LD C,6
LD E,0FFH LD E,0FFH
CALL BDOS ;CONSOLE INPUT
CALL BDOS
POP HL POP HL
POP BC
OR A OR A
SCF SCF
RET NZ ;KEY PRESSED
OR H
OR L
RET Z ;TIME-OUT
PUSH BC
LD A,-1
LD BC,1250 ;DELAY CONSTANT
WAIT: DEC BC
CP B
JP NZ,WAIT ;WAIT FOR APPROX 10ms
POP BC
DEC HL
JR INKEY
JR NZ,INKEY1
PUSH HL
CALL TICKS
POP DE
SBC HL,DE
EX DE,HL
JR C,WAIT
INKEY1: POP BC
RET
;
;CLS - Clear screen.
; (Customise to suit your VDU)
; Destroys: A,D,E,H,L,F
;
CLS:
LD DE,CLSSTR
LD C,9
JP BDOS
;
CLSSTR: DEFB ESC,'[H',ESC,'[2J$'
; ;
;PCSR - Move cursor to specified position. ;PCSR - Move cursor to specified position.
; Inputs: DE = horizontal position (LHS=0) ; Inputs: DE = horizontal position (LHS=0)
; HL = vertical position (TOP=0) ; HL = vertical position (TOP=0)
; called by TAB(column, row)
; Destroys: A,D,E,H,L,F
;
PCSR: LD B,L ; vertical = line (row) PCSR: LD B,L ; vertical = line (row)
CALL CONV ; normalized and convert to decimal CALL CONV ; normalized and convert to decimal
LD (LIN),HL ; and store into string LD (LIN),HL ; and store into string
LD B,E ; horizontal = column LD B,E ; horizontal = column
CALL CONV ; normalized and convert to decimal CALL CONV ; normalized and convert to decimal
LD (COL),HL ; and store into string LD (COL),HL ; and store into string
LD C,PRSTR ; output string command
LD C,9 ; output string command
LD DE,CURS ; start of string LD DE,CURS ; start of string
JR BDOS ; output string to terminal
JP BDOS ; output string to terminal
;
; VT100 sequence for cursor positioning ; VT100 sequence for cursor positioning
CURS: DEFB 27, '[' CURS: DEFB 27, '['
LIN: DEFW 0 ; high byte, low byte for decimal line LIN: DEFW 0 ; high byte, low byte for decimal line
DEFB ';' DEFB ';'
COL: DEFW 0 ; high byte, low byte for decimal column COL: DEFW 0 ; high byte, low byte for decimal column
DEFB 'H$' DEFB 'H$'
;
; convert binary B (0 <= B < 99, not checked) into B+1 in decimal. ; convert binary B (0 <= B < 99, not checked) into B+1 in decimal.
; L = upper byte, H = lower byte. ready for LD (...), HL ; L = upper byte, H = lower byte. ready for LD (...), HL
; destroys A, B, L, H ; destroys A, B, L, H
; optimized for space over time ; optimized for space over time
;
CONV: INC B ; normalize, home in VT100 is (1,1) CONV: INC B ; normalize, home in VT100 is (1,1)
LD A,'0' ; A is counter for low byte of result LD A,'0' ; A is counter for low byte of result
LD L,A ; L is counter for high byte of result LD L,A ; L is counter for high byte of result
@ -164,35 +190,7 @@ CONVLP: INC A ; now B times increment AL in decimal
CONT: DJNZ CONVLP ; B times CONT: DJNZ CONVLP ; B times
LD H,A ; put low byte into right place LD H,A ; put low byte into right place
RET RET
;BDOS - Save the IX and IY and alternate registers
; before performing a CP/M function call.
; ;
BDOS: PUSH IX
PUSH IY
EXX
PUSH BC
PUSH DE
PUSH HL
EXX
EX AF,AF'
PUSH AF
EX AF,AF'
CALL CPM
EX AF,AF'
POP AF
EX AF,AF'
EXX
POP HL
POP DE
POP BC
EXX
POP IY
POP IX
RET
;GCSR - Return cursor coordinates. ;GCSR - Return cursor coordinates.
; Outputs: DE = X coordinate (POS) ; Outputs: DE = X coordinate (POS)
; HL = Y coordinate (VPOS) ; HL = Y coordinate (VPOS)
@ -202,24 +200,42 @@ GCSR: LD DE,0
LD HL,0 LD HL,0
RET RET
; ;
IF $ GT 1F4H
;COUT - Output a character to the console
; Inputs: A = character
; Destroys: A,F
;
COUT: PUSH BC
PUSH DE
PUSH HL
LD E,A
LD C,2
CALL BDOS
POP HL
POP DE
POP BC
RET
;
;IF $ GT 1F0H
IF $-BEGIN GT 0F0H
ERROR 'INSUFFICIENT SPACE' ERROR 'INSUFFICIENT SPACE'
ENDIF ENDIF
; ;
ORG 1F4H
;ORG 1F0H
DEFS 0F0H - ($ - BEGIN)
; ;
OFFLO: DEFW 0 ;TIME OFFSET LO
OFFHI: DEFW 0 ;TIME OFFSET HI
DEFB 80 ;WIDTH DEFB 80 ;WIDTH
DEFB 'E' AND 1FH ;CURSOR UP
DEFB 'X' AND 1FH ;CURSOR DOWN
DEFB 'A' AND 1FH ;START OF LINE
DEFB 'F' AND 1FH ;END OF LINE
DEFB 'T' AND 1FH ;DELETE TO END OF LINE
DEFB 'H' AND 1FH ;BACKSPACE
DEFB 'U' AND 1FH ;CANCEL LINE
DEFB 'S' AND 1FH ;CURSOR LEFT
DEFB 'D' AND 1FH ;CURSOR RIGHT
DEFB 'G' AND 1FH ;DELETE CHARACTER
DEFB 'V' AND 1FH ;INSERT CHARACTER
DEFB 'G' AND 1FH ;CURSOR UP
DEFB 'O' AND 1FH ;CURSOR DOWN
DEFB 'F' AND 1FH ;START OF LINE
DEFB 'N' AND 1FH ;END OF LINE
DEFB 'X' AND 1FH ;DELETE TO END OF LINE
DEFB 08H ;BACKSPACE & DELETE
DEFB 'U' AND 1FH ;DEL TO START OF LINE
DEFB 'J' AND 1FH ;CURSOR LEFT
DEFB 'L' AND 1FH ;CURSOR RIGHT
DEFB 'R' AND 1FH ;DELETE CHARACTER
DEFB 'Q' AND 1FH ;INS/OVR TOGGLE
; ;
FIN: END FIN: END


2587
Source/Apps/BBCBASIC/eval.z80

File diff suppressed because it is too large

3274
Source/Apps/BBCBASIC/exec.z80

File diff suppressed because it is too large

64
Source/Apps/BBCBASIC/hook.z80

@ -0,0 +1,64 @@
NAME ('HOOK')
;
GLOBAL CLG
GLOBAL COLOUR
GLOBAL DRAW
GLOBAL ENVEL
GLOBAL GCOL
GLOBAL MODE
GLOBAL MOVE
GLOBAL PLOT
GLOBAL SOUND
GLOBAL PUTIMS
GLOBAL CIRCLE
GLOBAL ELLIPSE
GLOBAL FILL
GLOBAL MOUSE
GLOBAL ORIGIN
GLOBAL RECTAN
GLOBAL LINE
GLOBAL TINT
GLOBAL WAIT
GLOBAL SYS
;
GLOBAL ADVAL
GLOBAL POINT
GLOBAL GETIMS
GLOBAL TINTFN
GLOBAL MODEFN
GLOBAL WIDFN
;
EXTRN EXTERR
;
CLG:
COLOUR:
DRAW:
ENVEL:
GCOL:
MODE:
MOVE:
PLOT:
SOUND:
ADVAL:
POINT:
GETIMS:
PUTIMS:
CIRCLE:
ELLIPSE:
FILL:
MOUSE:
ORIGIN:
RECTAN:
LINE:
TINT:
TINTFN:
MODEFN:
WIDFN:
WAIT:
SYS:
XOR A
CALL EXTERR
DEFM 'Sorry'
DEFB 0
;
END

2237
Source/Apps/BBCBASIC/main.z80

File diff suppressed because it is too large

2267
Source/Apps/BBCBASIC/math.z80

File diff suppressed because it is too large

1
Source/Apps/Build.cmd

@ -30,6 +30,7 @@ pushd VGM && call Build || exit /b & popd
pushd cpuspd && call Build || exit /b & popd pushd cpuspd && call Build || exit /b & popd
pushd Survey && call Build || exit /b & popd pushd Survey && call Build || exit /b & popd
pushd HTalk && call Build || exit /b & popd pushd HTalk && call Build || exit /b & popd
pushd BBCBASIC && call Build || exit /b & popd
copy *.com %APPBIN%\ || exit /b copy *.com %APPBIN%\ || exit /b

1
Source/Apps/Clean.cmd

@ -19,3 +19,4 @@ pushd VGM && call Clean || exit /b 1 & popd
pushd cpuspd && call Clean || exit /b 1 & popd pushd cpuspd && call Clean || exit /b 1 & popd
pushd Survey && call Clean || exit /b 1 & popd pushd Survey && call Clean || exit /b 1 & popd
pushd HTalk && call Clean || exit /b 1 & popd pushd HTalk && call Clean || exit /b 1 & popd
pushd BBCBASIC && call Clean || exit /b 1 & popd

2
Source/Apps/Makefile

@ -1,6 +1,6 @@
OBJECTS = sysgen.com syscopy.com assign.com format.com talk.com \ OBJECTS = sysgen.com syscopy.com assign.com format.com talk.com \
mode.com rtc.com timer.com rtchb.com mode.com rtc.com timer.com rtchb.com
SUBDIRS = HTalk XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd Survey
SUBDIRS = HTalk XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd Survey BBCBASIC
DEST = ../../Binary/Apps DEST = ../../Binary/Apps
TOOLS =../../Tools TOOLS =../../Tools

BIN
Source/Images/Common/UTILS/BBCBASIC.COM

Binary file not shown.

13
Source/Images/Common/UTILS/BBCDIST.SUB

@ -1,13 +0,0 @@
; patch BBCBASIC with BBCDIST
; need M80 and L80
xsub
m80 =bbcdist/z
l80 bbcdist,bbcdist/n/e
ddt bbcbasic.org
ibbcdist.com
r
g0
save 58 bbcbasic.com
era bbcdist.rel
era bbcdist.com


2
Source/Images/hd_bp.txt

@ -11,6 +11,8 @@
# #
#../../Binary/Apps/*.com 15: #../../Binary/Apps/*.com 15:
../../Binary/Apps/assign.com 15: ../../Binary/Apps/assign.com 15:
../../Binary/Apps/bbcbasic.com 0:
../../Binary/Apps/bbcbasic.txt 0:
../../Binary/Apps/cpuspd.com 15: ../../Binary/Apps/cpuspd.com 15:
../../Binary/Apps/fat.com 15: ../../Binary/Apps/fat.com 15:
../../Binary/Apps/fdu.com 15: ../../Binary/Apps/fdu.com 15:

2
Source/Images/hd_cpm22.txt

@ -7,6 +7,8 @@ d_cpm22/ReadMe.txt 0:
# #
#../../Binary/Apps/*.com 0: #../../Binary/Apps/*.com 0:
../../Binary/Apps/assign.com 0: ../../Binary/Apps/assign.com 0:
../../Binary/Apps/bbcbasic.com 0:
../../Binary/Apps/bbcbasic.txt 0:
../../Binary/Apps/cpuspd.com 0: ../../Binary/Apps/cpuspd.com 0:
../../Binary/Apps/fat.com 0: ../../Binary/Apps/fat.com 0:
../../Binary/Apps/fdu.com 0: ../../Binary/Apps/fdu.com 0:

2
Source/Images/hd_cpm3.txt

@ -23,6 +23,8 @@
# #
#../../Binary/Apps/*.com 0: #../../Binary/Apps/*.com 0:
../../Binary/Apps/assign.com 0: ../../Binary/Apps/assign.com 0:
../../Binary/Apps/bbcbasic.com 0:
../../Binary/Apps/bbcbasic.txt 0:
../../Binary/Apps/cpuspd.com 0: ../../Binary/Apps/cpuspd.com 0:
../../Binary/Apps/fat.com 0: ../../Binary/Apps/fat.com 0:
../../Binary/Apps/fdu.com 0: ../../Binary/Apps/fdu.com 0:

2
Source/Images/hd_nzcom.txt

@ -24,6 +24,8 @@ d_zsdos/u0/*.* 0:
# #
#../../Binary/Apps/*.com 0: #../../Binary/Apps/*.com 0:
../../Binary/Apps/assign.com 0: ../../Binary/Apps/assign.com 0:
../../Binary/Apps/bbcbasic.com 0:
../../Binary/Apps/bbcbasic.txt 0:
../../Binary/Apps/cpuspd.com 0: ../../Binary/Apps/cpuspd.com 0:
../../Binary/Apps/fat.com 0: ../../Binary/Apps/fat.com 0:
../../Binary/Apps/fdu.com 0: ../../Binary/Apps/fdu.com 0:

2
Source/Images/hd_qpm.txt

@ -11,6 +11,8 @@ d_cpm22/u0/*.* 0:
# #
#../../Binary/Apps/*.com 0: #../../Binary/Apps/*.com 0:
../../Binary/Apps/assign.com 0: ../../Binary/Apps/assign.com 0:
../../Binary/Apps/bbcbasic.com 0:
../../Binary/Apps/bbcbasic.txt 0:
../../Binary/Apps/cpuspd.com 0: ../../Binary/Apps/cpuspd.com 0:
../../Binary/Apps/fat.com 0: ../../Binary/Apps/fat.com 0:
../../Binary/Apps/fdu.com 0: ../../Binary/Apps/fdu.com 0:

2
Source/Images/hd_zpm3.txt

@ -22,6 +22,8 @@
# #
#../../Binary/Apps/*.com 15: #../../Binary/Apps/*.com 15:
../../Binary/Apps/assign.com 15: ../../Binary/Apps/assign.com 15:
../../Binary/Apps/bbcbasic.com 0:
../../Binary/Apps/bbcbasic.txt 0:
../../Binary/Apps/cpuspd.com 15: ../../Binary/Apps/cpuspd.com 15:
../../Binary/Apps/fat.com 15: ../../Binary/Apps/fat.com 15:
../../Binary/Apps/fdu.com 15: ../../Binary/Apps/fdu.com 15:

2
Source/Images/hd_zsdos.txt

@ -20,6 +20,8 @@ d_cpm22/u0/XSUB.COM 0:
# #
#../../Binary/Apps/*.com 0: #../../Binary/Apps/*.com 0:
../../Binary/Apps/assign.com 0: ../../Binary/Apps/assign.com 0:
../../Binary/Apps/bbcbasic.com 0:
../../Binary/Apps/bbcbasic.txt 0:
../../Binary/Apps/cpuspd.com 0: ../../Binary/Apps/cpuspd.com 0:
../../Binary/Apps/fat.com 0: ../../Binary/Apps/fat.com 0:
../../Binary/Apps/fdu.com 0: ../../Binary/Apps/fdu.com 0:

2
Source/ver.inc

@ -2,7 +2,7 @@
#DEFINE RMN 5 #DEFINE RMN 5
#DEFINE RUP 0 #DEFINE RUP 0
#DEFINE RTP 0 #DEFINE RTP 0
#DEFINE BIOSVER "3.5.0-dev.43"
#DEFINE BIOSVER "3.5.0-dev.44"
#define rmj RMJ #define rmj RMJ
#define rmn RMN #define rmn RMN
#define rup RUP #define rup RUP

2
Source/ver.lib

@ -3,5 +3,5 @@ rmn equ 5
rup equ 0 rup equ 0
rtp equ 0 rtp equ 0
biosver macro biosver macro
db "3.5.0-dev.43"
db "3.5.0-dev.44"
endm endm

Loading…
Cancel
Save