zmakebas doesn't correctly tokenize DEF FN
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zmakebas (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
(This is an upstream Debian bug, but I can only report it through this channel as I'm running Ubuntu.)
Observed behaviour:
Using source program zxfn.bas:
10 DEF FN s(x)=x*x
20 PRINT FN s(2)
and invocation
zmakebas -n zxfn -o zxfn.tap zxfn.bas
generates the following binary:
00000000: 1300 0000 7a78 666e 2020 2020 2020 1f00 ....zxfn ..
00000010: 0080 1f00 8a21 00ff 000a 0a00 ce73 2878 .....!.......s(x
00000020: 293d 782a 780d 0014 0d00 f5a8 7328 320e )=x*x.......s(2.
00000030: 0000 0200 0029 0d24 .....).$
which when loaded into a ZX Spectrum (either real or emulated) gives the error
Q Parameter error, 20:1
Expected behaviour:
Source and process as above, except using updated zmakebas from
https:/
generates the following more correct binary:
00000000: 1300 0000 7a78 666e 2020 2020 2020 2500 ....zxfn %.
00000010: 0080 2500 8a27 00ff 000a 1000 ce73 2878 ..%..'.......s(x
00000020: 0e00 0000 0000 293d 782a 780d 0014 0d00 ......)=x*x.....
00000030: f5a8 7328 320e 0000 0200 0029 0d30 ..s(2......).0
which when run as above, produces the expected output:
2
Ubuntu release:
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Package:
zmakebas:
Installed: 1.2-1.1build1
Candidate: 1.2-1.1build1
Version table:
*** 1.2-1.1build1 500
500 http://
100 /var/lib/
I got similar bug on Debian: https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 1017991
The solution is available and works (at least in my case) from original author:
https:/ /groups. google. com/g/comp. sys.sinclair/ search? q=zmakebas /groups. google. com/g/comp. sys.sinclair/ c/kekZGs8SXOw/ m/cr094fp3AgAJ /zgedneil. nfshost. com/zmakebas. html /zgedneil. nfshost. com/zmakebas- 1.2b.tar. gz
https:/
https:/
https:/
It would be nice to upgrade to new version.
Best regards