zmakebas doesn't correctly tokenize DEF FN

Bug #1908289 reported by scruss
12
This bug affects 2 people
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://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

Revision history for this message
Ivan Tatarinov (ivan-tat) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zmakebas (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.