Search found 1217 matches

by t0nyt
Thu Sep 18, 2025 7:14 pm
Forum: Software & Programming
Topic: Adventures with I2C & Minerva Mk2
Replies: 96
Views: 3952

Re: Adventures with I2C & Minerva Mk2

I decided to put the new extension to the test

So added the following code snippet to Dilwyn's port of the Dracula adventure and replaced most of the "PRINT #0," with "PRINT0" and it works a treat speaking all the phrases until I got bitten and killed by Dracula! (if making a proper version I'd ...
by t0nyt
Thu Sep 18, 2025 3:48 pm
Forum: Software & Programming
Topic: Assembler Programming Problem
Replies: 14
Views: 399

Re: Assembler Programming Problem



It seems if you try and read a string parameter before then trying to read numeric value(s) the first number gets read as a string


Really? I'm surprised!

You might find section 7.5.2, table 7.7 and section 7.6 in the 2020 edition of my book useful. You can determine each parameter type from ...
by t0nyt
Thu Sep 18, 2025 10:00 am
Forum: Software & Programming
Topic: Assembler Programming Problem
Replies: 14
Views: 399

Re: Assembler Programming Problem

After doing just GTSTRG, but with 2 numeric parameters (in this case 16,1), the name table shows first entry as a numeric on the RI stack and the 2nd parameter as type $0203 so not on RI stack

When I look at the RI stack the number 16 is actually a string (2 bytes of length & ascii characters for ...
by t0nyt
Thu Sep 18, 2025 9:37 am
Forum: Software & Programming
Topic: Assembler Programming Problem
Replies: 14
Views: 399

Re: Assembler Programming Problem

When I debug, the parameter(s) don't appear on the name table A6,A3.l until after GTSTR or GTINT are called

So that rules out checking the parameter type BEFORE making a GTSTR/GTINT call

And once I make a GTSTR call, and there's not a string parameter, the call to GTINT doesn't work to get the ...
by t0nyt
Thu Sep 18, 2025 8:55 am
Forum: Software & Programming
Topic: Oddity with RND
Replies: 4
Views: 159

Re: Oddity with RND

Hi Rich

I came across this when I was trying to get Night Nurse running on Minerva too

Sorry, I probably should have mentioned it!

IIRC JS doesn’t do anything with the 2nd range, just ignores it?
by t0nyt
Thu Sep 18, 2025 7:44 am
Forum: Software & Programming
Topic: Assembler Programming Problem
Replies: 14
Views: 399

Re: Assembler Programming Problem

Will take a look, thanks Norm

What I was doing was calling GTSTR, check for $0101 on the name table

If there was a match then I would use the string

If it wasn’t a match I’d then call GTINT but that didn’t return the 1 or 2 integers, but debugging showed the ascii version of the 1st integer value ...
by t0nyt
Wed Sep 17, 2025 7:09 pm
Forum: Software & Programming
Topic: Adventures with I2C & Minerva Mk2
Replies: 96
Views: 3952

Re: Adventures with I2C & Minerva Mk2

Have got the i2c_say text-to-speech extension nearly completed

I had to split the numeric parameter commands into a separate command i2c_say_cmd (sorry Dave, but I’ll revisit this later)

The only thing still to do is to replace the DS.B work buffer with using space on the maths stack!

I think a ...
by t0nyt
Wed Sep 17, 2025 5:46 pm
Forum: Software & Programming
Topic: Assembler Programming Problem
Replies: 14
Views: 399

Re: Assembler Programming Problem

It seems if you try and read a string parameter before then trying to read numeric value(s) the first number gets read as a string

So my plan to have
i2c_say("<text>")
i2c_say 16
i2c_say 16,1

Won't work

Will have to split them into 2 procedures I guess
by t0nyt
Wed Sep 17, 2025 8:57 am
Forum: Software & Programming
Topic: Assembler Programming Problem
Replies: 14
Views: 399

Re: Assembler Programming Problem


Hi Tony,

Maybe it's because that's a function rather than a procedure

This is exactly the solution. Functions need parentheses, procedures don't and throw a "Bad Line" error if you use them.

If you change your procedure to a function, you'll need to be very very careful about keeping the ...
by t0nyt
Wed Sep 17, 2025 6:10 am
Forum: Software & Programming
Topic: Assembler Programming Problem
Replies: 14
Views: 399

Re: Assembler Programming Problem

It’s occurred to me that the extension might be better off as a function anyway so it can return just a status rather than an SBASIC error, in most cases