Page 1 of 1

Error which can not possibly exist in z80asm Version 1.8

Posted: Tue Jul 16, 2019 6:18 pm
by 2late
The error message tells me.

Code: Select all

shift.zas:1386: error: unable to resolve reference: iy
As far as I understand this could happen e.g. with

Code: Select all

jrz r,iy
because here the iy would be interpreted as a variable or a lable or so. The strange thing is, that a text search uncovers not one single iy in the source file shift.zas.

There is also an error

Code: Select all

shift.zas:1386: error: unable to resolve reference: sp
and there are

Code: Select all

sp
in the source, but only in comments.

What am I missing here?

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Wed Jul 17, 2019 3:13 am
by XavSnap
Hi 2late,

Sorry for my answer which will be useless with regard to your psedo …

Code: Select all

shift.zas:1386: error: unable to resolve reference: iy
Nerver set a label : "A:","SP:", "HL:","BC" … in your code.
The lower/hupper case may give a wrong label jump.

Code: Select all

jrz r,iy
It's a relative jump used to jump in -126 to 127 relative jump, the step is based on your oppcodes room jump.
The relative jump may be too far, and the relative jump is up to 127 bytes.
You had to use "JP" instead of "JR". (and IY is a wrong label!... it's a register name)
"JR" had to be used with a label !

Code: Select all

JRz LABEL
JR r(DOT?)iy
…
r.iy: ; << It's a label !

Code: Select all

shift.zas:1386: error: unable to resolve reference: sp

Jr sp ou Jp sp ?
Nerver set a label : "A:","SP:", "HL:","BC","IX","IR","SP","LD","SUB",XOR","RES" … in your code.
:mrgreen:

The "shift.zas" file seem to be bugged, as is ?
-Just try to check labels and jumps name…
The "," character may be a joker to replace another character used in the primary charset !
"r,iy", can be understand "r_iy" or "r-iy" or "r§iy" or "r@iy"... try to find the right character replacement …

-Don't add codes between a target label and a "JR" call, or use a "JP" function (static code jump).

http://zx81.vb81.free.fr/ASM2.html

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Wed Jul 17, 2019 4:46 pm
by 2late
XavSnap wrote: Wed Jul 17, 2019 3:13 am Sorry for my answer which will be useless with regard to your psedo …
I fear, you are right.
XavSnap wrote: Wed Jul 17, 2019 3:13 am

Code: Select all

shift.zas:1386: error: unable to resolve reference: iy
Nerver set a label : "A:","SP:", "HL:","BC" … in your code.
The lower/hupper case may give a wrong label jump.
I don't deny that this is good advice, But as far as I see, I didn't. I'm happy to provide a copy of shift.zas, if anyone cares. It will be free software anyway, in case it gets somewhere. But
- it is code for the time being aimed more at the Spectrum, because I know more about this machine
- it makes "no sense" in the form given and
- it is not easy to debug, because the code consists of related pieces, so may first idea to systematically omit parts, to narrow down would produce an enormous number of testcases.,
To present it without warning, would be impertinence.
XavSnap wrote: Wed Jul 17, 2019 3:13 am -Just try to check labels and jumps name…
That's the strangeness
1. there is no iy
2. sp only appeared after a ;

Your suggestion, that there might by a strange character set is the sort of ideas, I'm after, There would have to be a charactersets for
- the editor (geany)
- the terminal
- z80asm
which has characters which look like i or y in the terninal, but have different code-points.

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Wed Jul 17, 2019 6:00 pm
by XavSnap
which has characters which look like i or y in the terminal, but have different code-points.
Yes…
Or it's an OCR issus… "0"="o"... "I"="1" or "L"...
Or it's the Spectrum ASCII page code, were any codes like "£" are at the wrong place in the IBM ASCII table.

Spectrum Ascii table:
1.JPG
1.JPG (27.59 KiB) Viewed 4957 times

IBM Ascii table:
2.JPG
2.JPG (64.86 KiB) Viewed 4957 times
Easier to disassemble the binary to get the right label !

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Thu Jul 18, 2019 4:52 pm
by 2late
XavSnap wrote: Wed Jul 17, 2019 6:00 pm Or it's an OCR issus… "0"="o"... "I"="1" or "L"...
I typed everything in with my bare hands. That's how we oldtimers do things. https://www.memecenter.com/fun/2086225/old-timers
XavSnap wrote: Wed Jul 17, 2019 6:00 pm Or it's the Spectrum ASCII page code, were any codes like "£" are at the wrong place in the IBM ASCII table.
On the other hand, my machines are up there, collecting dust and I'm not typing the source on an emulator. So I think that as long as z80asm is able to get the character set right which geany produces, I should be set. To the best of my knowledge I haven't changed anything here lately.

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Thu Jul 18, 2019 5:37 pm
by XavSnap
:lol:
Yes, "OCR" vs "glasses & old eyes" !
OCR win…

Seriously, I'm tired of looking for the little fuctions on the ZX81 or Spectum keyboard !
INK, PAPER… 3 keys to change the color in Basic …
Just use "J",shift+"P",shift+"P" & "R".

All programs in a text mode, on a pretty "word-pad"...
(Xur,ZxToken...ZmakeBas…tokenizers)

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Thu Jul 18, 2019 11:47 pm
by 2late
The issue has been resolved by word of God.

It seems that using an incorrect syntax for some IX commands like

Code: Select all

LD (IX),A
instead of

Code: Select all

LD (IX+0),A
you get this strange error messages about IY and SP.

Thanks to all who contributed to the discussion and the solution.

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Fri Jul 19, 2019 12:51 am
by XavSnap
Cool !
Have fun...

Re: Error which can not possibly exist in z80asm Version 1.8

Posted: Sat Jul 20, 2019 3:52 pm
by 1024MAK
XavSnap wrote: Thu Jul 18, 2019 5:37 pm :lol:
Yes, "OCR" vs "glasses & old eyes" !
OCR win…
OCR = Old Crusty Retinas... (well, for me anyway) :lol:

Mark