API Function $26 CLIGetHexParam

54 views
Skip to first unread message

Mike Hankey

unread,
Jun 7, 2024, 3:40:39 PMJun 7
to RC2014-Z80
The user guide does not list an entry for API function $26 but  I've looked in the SCM code and it does seem to be available, but when I try to access it I get a "bad parameter' error.

Is it actually available? and if so is it called the usual way the other API functions are called?

ld  c,$26
rst $30

I tried setting Reg. A with the kReportAny error report code, but that didn't help.

Steve Cousins

unread,
Jun 7, 2024, 5:05:24 PMJun 7
to RC2014-Z80
Hi Mike,

API $23 to $26 are used to aid processing of a string that contains parameters. For example: "DUMP 8000 80FF"

The string must be stored in memory and register pair DE point to the current address within the string.

In your example you have not specified DE and you do not mention having a string in memory, so an error is not unexpected. Other than that, yes, your example would be valid.

API $26 is documented in the SCM user guide:
Page 68 of SCM user guide v1.0
Page 72 of SCM user guide v1.3

Not sure where you were looking for info, but there is plenty in the SCM user guide. Is there somewhere in my documentation or website that misses out API $26?

Hopefully, that helps a bit. 

Steve

Mike Hankey

unread,
Jun 7, 2024, 5:33:17 PMJun 7
to RC2014-Z80
I'm embarrassed to say I was looking at an old SCM User Guide 0.2.0, don't know where I got it.
I downloaded the 1.0 manual and yes the API Function $26 is there.  
In the code it mentioned that DE needed to be set to the "Location of parameter in input line" and I set it to a location in memory I had designated for something else just to see if it would work and it didn't.

I'll try again tomorrow armed with the new info.

Thanks so much for your speedy response and info.

Mike Hankey

unread,
Jun 7, 2024, 6:04:44 PMJun 7
to RC2014-Z80
Steven,

When I tried the API $26 function I was under the false impression that it input the characters then returned the DB or DW value in HL.
It finally dawned on me, sometimes it takes a while that the value is input then the $26 function is called to convert the input to a hex value.

I tired it and it worked like a charm.

Thanks
Mike

Reply all
Reply to author
Forward
0 new messages