Talk:Z
Jump to navigation
Jump to search
I am trying to implement (well, re-implement) Z, but I'm having trouble understanding what some instructions are supposed to do and running examples.
zz Z
,zZ
,Zz
andZZ
, and the memory handling in general, are badly explained. Can you give a better explanation or a pseudocode?- Are
zzz
andzzZ
0- or 1- based? - How should A be rounded to give memory addresses (tw/ 0, tw/ -inf, tw/ +inf, tw/ closest integer, something else), assuming it is supposed to be floating point (as there is a decimal point for
zz z
)? - Is I/O numeric or character based?
- How is EOF handled?
TuxCrafting (talk) 07:59, 18 May 2019 (UTC)
- Wow, in retrospect, this language was very poorly thought through, but I'll try to give a belated explanation based on how I remember it working.
- Aside from the
A
register, there is an indexP
which points to a location on the tape.zz Z
meansA = tape[A]
.zZ
meansP = A
.Zz
meanstape[P] = A
.ZZ z
andZZ Z
meantape[P] += A
andtape[P] -= A
respectively.
- Judging from the example programs, 1-based.
- It's too poorly specified for me to know, and including floating point was a bad idea anyway, so I'll just remove it.
- Either one is spec-compliant.
- It's UB.
- Aside from the
- Challenger5 (talk) 01:03, 1 April 2020 (UTC)
Hello! I've made an implementation available here https://github.com/Yul3n/esoo, however further tests are needed. Yul3n (talk) 08:31, 31 March 2020 (UTC)
- See my reply to User:TuxCrafting above in case that helps disambiguate anything. Challenger5 (talk) 01:04, 1 April 2020 (UTC)