Public bug reported:
(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://derekbolli.wordpress.com/2012/11/16/create-zx-spectrum-basic-program-tap-file-from-text-source-file-in-bbedit-using-zmakebas/
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://ca.archive.ubuntu.com/ubuntu focal/universe amd64
Packages
100 /var/lib/dpkg/status
** Affects: zmakebas (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1908289
Title:
zmakebas doesn't correctly tokenize DEF FN
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zmakebas/+bug/1908289/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs