It would be nice to update the assembler

ZXNet echo conference «zx.spectrum»

From Roman Khvatov To All 1 May 1997


Hello Andrew!

29 Apr 97, Andrew MOA writes to Roman Khvatov:

AM> Everything is new, this is the well-forgotten old. :)
AM> Here, for example, is the tasm276 package

Well, it's not forgotten.

AM> === Cut ===
AM> TASM is a table driven cross assembler for the MS-DOS environment.

[all skip]

AM> === Cut ===

AM> Although, of course, the thing is quite a toy.

That's right, it can be considered as zero approximation, no more.

Roman


From Michael Kondratyev To All 2 May 1997


Hello Vyacheslav!

Mon Apr 28 1997, Vyacheslav Mednonogov concocted a letter to Michael
Kondratyev:

VM>>> to one sub at a time (but this is typical IMHO
VM>>> multitasking systems)
MK>> Poor imagination you have. When, for example, a p/n calls itself.
VM> This is called a recursive call :)

Of course. My point is that this in no way correlates with multitasking.

MK>> In interrupt handlers it is not so difficult to put a semaphore - where
MK>> the effect is undesirable, its possibility is excluded.
VM> As a semaphore - DI/EI. Hardware disabling of unwanted
VM> effects :)

Masked and so protected from nesting (iff1). Some sense of introducing
semaphores is seen, for example, in the reluctance to skip an interrupt for some part of the
handler.

VM> Suppose the handler is redrawing the cursor, using for
VM> some kind of sprite output. It is quite possible for an interrupt to arrive when
VM> this p/n, being called from the main program, is engaged in the output of
VM> another sprite.

Hmm, not only possible but also widely used. And for those who are too lazy to
turn off the cursor when displaying under it, we also observe quite a lot.


With best wishes, Michael.


From Roman Khvatov To All 3 May 1997


Hello Vyacheslav!

28 Apr 97, Vyacheslav Mednonogov writes to Roman Khvatov:

VM> I wonder if it is possible to specify not only a list of possible parameters, but
VM> and a list of possible operations? Like {+|-|>>|<<|&|^|...}, and in the macro
VM> you can somehow assign them add,sub,rr,rl,and,xor,... ?

For _one_ operator per macro (or any _fixed_ number) -
is possible. You just need to introduce the concept of patterns, each type of pattern is described by a structure, the structure consists of fields - rows. The pattern is specified by a set of sets of
these same lines, then any
field of the pattern can appear in the regular expression, in the body of the macro you can substitute any other field of the same
pattern, example:

#patterns

pattern LogOp {
mnemonic: string;
opcode: string;
};
LogOp ops={
{'|',or},
{'&',and},
{'^',xor}
};
#end patterns

macro 'A = A '+ops.mnemonic+' {\n}'
#ops.opcode #1
endm

VM> a) A/HL always change if the expression contains more than two
VM> operands. Those. You will only need to remember _only_ about assignment operations,
VM> for example, c=(hl) and c=(memory). The habit should be developed soon :)

It will, of course, be developed, but all the same - when some
obviously not mentioned actions take place in assembler, it’s somehow notvery good :)

VM> b) even
VM> in assembler register A is often used as an auxiliary register, for example:
VM> LD A,L ADD A,32 LD L,A The only important thing here is that L will increase by 32.

Of course, the fact that A has also changed is not important here, but at least
it is visible.

RK>> Or maybe there is (well, at least partially) a team from Borland or
RK>> Microsoft ;) (By the way, will a team from Sun microsystems be okay? :)
VM> Will be okay :)

I'm glad ;-)

Roman

PS. I have in my “long drawer” a project for a universal cross-system, customized to a specific command system and hardware, and including an assembler, a linker, and a debugger (with an emulator). The processor itself is described by a system similar to the above examples. Modules for assembly,
disassembly and emulation are generated automatically according to the description of the
processor. The assembler itself has its own set of macro tools, on the basis of which the assembler macro tools that exist for a given processor are made. The debugger has support for debugging programs translated from Java. (The nuclear computers themselves are written by hand, since their automatic generation is hardly
possible)
The project is frozen due to a chronic lack of time and the disappearance of an urgent need for it.