New assembler for Z80

ZXNet echo conference «zx.spectrum»

From Konstantin Afendikov To All 4 May 1997


Hello, Dmitry!

Thursday May 01 1997 11:49, Dmitry Grigoryev wrote Konstantin Afendikov these
words:

KA>> .... and highlighted it! Well, I apologized for 'us'... G8)

DG> It's not about the apologies, but the fact that if you didn't know this, then you didn't
DG> support it in the converter.
I supported it. Only wrong - I left it with the EXA token. Yes, and the envelope was written at the very end, and we tested it using some example in Faultless, where there were neither pseudo-macros nor this EXA. But you can’t distill your own sources - we
continuous colons Ж8)

DG>>> I’m wondering... Does the new converter in ZASM know about all this?

KA>> if he doesn’t know, we’ll teach him! Ж8)

DG> This makes me happy :)
Already taught. At least MASM will convert normally. I asked
to send any texts for testing, but no one sent anything. I
checked it - in _my_ examples everything is fine, but I also can’t
check everything without knowing all the features of this assembler.

DG>>> The old one didn’t even know MASM’s pseudo-macros

KA>> he already understands 2x2... like _normal_ (almost) macros
KA>> yourself Ж8)

DG> _Almost_ normal macros are also pseudo ;)
No, it’s just that now, with any nesting of macros and any number of parameters,
the parameters themselves can be _only_ numerical expressions. This is for ussatisfied,
we stopped there. But recently Vova Hex in one of his letters proposed to support text lines in macro parameters. I wanted to do this today (i.e. now at night), but I’m unlikely to have time before the morning... So there will be _normal_
macros! And in the parameters it will be possible to specify both lines of text and
registers and file names. Only I won’t allow one perversion... Now I’ll write an example, and then I’m interested in hearing _All_’s opinion! Example (I will write without
colons so that everyone can understand):

IncR macro ; Calculation of the address of the next line of the screen
inc =2
ld a,=2
and 7
jrnz $+12
ld a,=1
add a,32
ld =1,a
jrc $+6
ld a,=2
sub 8
ld =2,a
endm

Call: IncR e,d. This is normal. But this, IMHO, is superfluous:

AddReg_A add a,=1 ;
ld =1,a
jrnc $+3
inc =2
ld a,(=2+=1)
Call AddReg_A l,h . Those. the command ld a,(=2+=1) is deciphered as
ld a,(hl). Superfluous or not? 8-\

DG> Sincerely, Dmitry (OLDMAN).

DG> -+- GoldED 3.00.Alpha2+
DG> + Origin: * ON-LINE newspaper * (2:5020/689.31)

Best wishes, Konstantin.

[Team ZX ASM] [Team Dos Navigator] [Team DOOM]


From Vyacheslav Mednonogov To All 4 May 1997


Get msg, Konstantin!

04 May 97 01:59 -- Konstantin Afendikov told Dmitry Grigoryev about the New
Assembler for Z80:

KA> IncR macro ; Calculation of the address of the next line of the screen
KA> Call: IncR e,d. This is normal. But this, IMHO, is unnecessary:
KA> Call AddReg_A l,h . Those. the command ld a,(=2+=1) is deciphered as
KA> ld a,(hl). Superfluous or not? 8-\

Just the opposite. What AddReg_A does (searching for an array)
occurs in a large program fifty to a hundred times, and IncR - no more than a dozen
(IMHO).

The only thing is that AddReg_A is easier (and perhaps better) to design as a
subroutine to save memory, and IncR is better left as a macro (someone
even had such a construction in assembler. Not you :)

Warm greetings, Slava.


From Dmitry Grigoryev To All 5 May 1997

KA> I supported that. Only wrong - I left it with the EXA token. Yes, and
KA> the envelope was written at the very end, and we tested it using some example in
KA> Faultless, where there were neither pseudo-macros nor this EXA. But you can’t distill your sources
KA> - we’re just left with colons Ж8)

That is, there is no converter from Zasma to other assemblers and there never will be? Well, well...

KA> Already taught. At least MASM will convert normally. Well, I asked
KA> to send any texts for testing, but no one sent anything.

And they won’t. I should have read the documents myself, and then asked the authors about
undocumented features.

KA> I checked it - in _my_ examples everything is fine, but I also
KA> can’t check it all, not knowing all the features of this assembler.

[missing...]

KA> So, There will be _normal_ macros! And in the parameters it will be possible
KA> to specify both lines of text and registers and file names. Only
KA> I won’t allow one perversion... Now I’ll write an example, and then I
KA> will be interested to hear _All_’s opinion! Example (I will write without colons,
KA> so that everyone can understand):

From Konstantin Afendikov To All 8 May 1997

KA>> ld a,(hl). Superfluous or not? 8-\

VM> Just the opposite. What AddReg_A does (search for an array),
VM> occurs in a large program fifty to a hundred times, and IncR - no more than
VM> a dozen (IMHO).

VM> The only thing is that AddReg_A is easier (and perhaps better) to design as a
VM> subroutine to save memory, and IncR is better left as a macro (
VM> some even have such a design was in assembler? Didn't you? :)
Slava, you misunderstood me! I gave _such_ examples completely by accident, what popped into my head. I meant, is it worth *summing* two
parameters if they are halves of a register pair? Those. 1st parameter - h,
second parameter - l, =1+=2=hl. DG said _too much_ (and thank God!), but what do you think? And IncR - there was (and is) such a pseudo-macro in MASM.

VM> With warm greetings, Slava.

From Vyacheslav Mednonogov To All 8 May 1997


Get msg, Konstantin!

08 May 97 00:18 -- Konstantin Afendikov told Vyacheslav Mednonogov about the New
Assembler for Z80:

KA> I meant, is it worth *summing* two parameters if they
KA> are halves of a register pair? Those. 1st parameter - h, second
KA> parameter - l, =1+=2=hl. DG said _too much_ (and thank God!), but what do you
KA> think?

I join DG. What if the parameters are registers that are not part of the same
pair?

Although the idea is valuable (in the sense of increasing flexibility). I propose another possible
option:

B_Dim MAC
ADD A,=0.L
LD =0.L,A
JR NC,$+offset
INC =0.H
ENDM

Call:
LD A, number
B_Dim HL

That is =0.L is the low register, =0.H is the high register, and =0 is the entire register
pair.
With warm greetings, Slava.


From Konstantin Afendikov To All 10 May 1997


Hello, Dmitry!

Thursday May 08 1997 19:02, Dmitry Grigoryev wrote to Konstantin Afendikov these
words:


DG> Tuesday 06 May 1997 20:16, Konstantin Afendikov wrote to Dmitry Grigoryev:

DG>>> That is, from Zasma There is no converter for other assemblers and there never will be?
DG>>> Well, well...

KA>> And name me at least one ASM (besides ZASM) that _at least_ converted into text
KA>>,

DG> Hazov. One. Tasm 4.xx by RST7
GIVE! I want to look!

KA>> not to mention converting directly into your own encoding?
I wrote it wrong... Ж8(

DG> I didn’t understand...
so you didn’t understand...
DG> Everyone converts to their encoding (although not everything), but from their own
DG> - yes, no one, everyone thinks that their assembler is the best ;)
A we will convert into text -> we are not the best, etc. Ж8)

DG>>> And he won’t send it.

KA>> Thank you. Ж8(

DG> Why should I care? I can send you something if you send me the source codes
DG> send me the disk-doctor (working, of course, as you asked) :-)
And there are solid RFS, so you need to send the zasmov source codes too.
RFS - macro:
RFS macro:rst 10:db =1:endm. Through it, from overlays, access is provided to
zasma procedures (a la is-dos).

DG>>> I should have read the documents myself, and then asked the authors

KA>> Where can I get them? By phonecall? I don’t want to.

DG> It’s up to you, of course... I don’t like calling myself. But you met AIG here
DG>... KSA could write on ZXNet, ALEM and RST7 can be found through
DG> the Kharkov network, the author of XASM, in my opinion, lives in St. Petersburg - they have
DG> SPbZXNet... Don’t you want to write letters either?
At least explain how to write to *ZXNets.

KA>> Q 3.10 you can write an envelope from anything in ZASM yourself. For
KA>> this you only need to be able to unpack the string of the ASMA you need.

DG> I can, but can those who need 128-character tags? :-) Timers
DG> are yours?
oh, you’re so harmful! Ж8)

[skip ASMO features]
DG> ?? Imagine, I didn’t get confused :) Only my labels are PRTSCR, LDTXT -
DG> I’ll start pressing Shift again :)
That’s it! IMHO, it’s inconvenient.
[skip]

KA>> In no assembler, the label table cannot be 24 kilos
KA>> (and in ZASM this was the case).

DG> You’ll also set a record for comments ;) What are you proud of?
What to do when you compile ~250-300 kilos of text? Now everything is compiled separately, but previously overlays and the program were together.

DG>>> I look at this and just can’t understand the beauty of macros :-) No, they are not needed
DG>>> they are not particularly needed, in my opinion... :-))

KA>> And ifs are probably not needed either? Ж8)

DG> Nope ;)This is superfluous ;)
yeah, exactly! G8)

From Konstantin Afendikov To All 11 May 1997

VM> I join DG. What if the parameters are registers that are not included in the
VM> pair?

VM> Although the idea is valuable (in the sense of increasing flexibility). I propose another
VM> possible option:

VM> B_Dim MAC
VM> ADD A,=0.L
VM> LD =0.L,A
VM> JR NC,$+offset
There may be a glitch here if there is IX,IY. Although _here_ is not the place for them! Ж8)
VM> INC =0.H
VM> ENDM

VM> Call:
VM> LD A, number
VM> B_Dim HL

VM> I.e. =0.L is the low register, =0.H is the high register, and =0 is
VM> the entire register pair.
The idea is really valuable. I just don't like the syntax. 0.L - 16
bit RLC in the calculator (in ZASM 3.10), although 0.H is unused. And there cannot be a 0
parameter. G8)

From Paul Falcon (812/03.00) To All 11 May 1997

KA>> You say that because you haven’t used it. If you play it, it will drag on. Ж8)

DG> Yuzal ;) I spent three years in the General Staff. It didn’t drag on ;) Although it’s not the same :(
Okay,
DG> let’s see, maybe I’ll really get involved ;)

We all come from there...

KA>> Although... for now they’ll do macros in ALASM....

DG> Let’s do better with binary operands and line numbering - without this I won’t switch to it with
Masma
DG> ;)

from alasma me... I was turned away by the inconvenience of everything that is there,
what is it worth to write it to disk at least... for some reason the name should be entered separately
it’s creepy.

And lastly, _NONE_ OF_PROFESSIONALS_MOULD_MAKE_
for any price go to another ASM, I’m doing this with
one amateur zasma _HALF_YEAR_ and nothing... He lured all his
comrades into XAS, but he didn’t join any! So
forget it, or better yet, let’s be more specific about working with the asm itself,
as they say, “closer to body!"

From Andrew MOA To All 15 May 1997

From Evgeny Milun To All 15 May 1997


Hello Dmitry !

Monday May 12 1997 20:40, Dmitry Grigoryev ─── Konstantin Afendikov:

KA>> At least explain how to write in *ZXNet's.

DG> Easy as pie :) Select any of the gates (in the output data of any
DG> Online), write to his address, but in the To field: insert the first name, last name and
DG> address in brackets of the ZXNet addressee (and not the owner of the gate).
Have you already changed everything? Previously, the address on ZXNet was in SUBJe.
[....]
Good luck! Evgeny.


From Andrew MOA To All 20 May 1997


On the day of May 17, 97, Dmitry Grigoryev had the good fortune to write to Andrew Moa:

AM>> See the example in the letter to Slava.
DG> Yes, there will be no glitches here, but... this is the very thing... a chain of commands of five lines,
DG> which you write without thinking, has turned into a rather capacious procedure
DG> ;-)

Firstly, not a procedure, but into a macro (which does not “consume” space and lies
somewhere), secondly, within the text of the program, calling such a macro is more visual than a _chain_ of commands. Thirdly, it’s easier to make a mistake in several lines you type without thinking than in one.
In general, macros are convenient to use when necessary (checking
arguments, generating tables...)
Although, I’m not agitating anyone anymore.
:)

Andrew