Repository navigation
Replies: 52 comments 47 replies
|
I'm adding a macro table to the list file. |
|
Just some questions: altairsim/roms/turnmon.hex |
|
I have locally changed the macro code to not convert to upper case. This looks much nicer in the listing, |
|
I always thought that the macro (and label, etc) lookup were not case
sensitive... but, case
was to be retained in 'quoted' strings. Anywhere else, a conversion to
upper could be
expected. The only problem is in the IRPC macro. So, let us run some
code through M80:
.8080
0000' aseg
org 100h
irpc c,abcABCxyz
db '&c'
endm
0100 61 + db 'a'
0101 62 + db 'b'
0102 63 + db 'c'
0103 41 + db 'A'
0104 42 + db 'B'
0105 43 + db 'C'
0106 78 + db 'x'
0107 79 + db 'y'
0108 7A + db 'z'
end
And here we see that the string is NOT upper-cased, but taken as is.
Now, if
db '&c'
is replaced by
db &c
we see that
db a is the SAME as db A -- which is to say 07 (the value of A as a
register operand).
That compare is done case insensitive -- so, delay the compare until
the actual symbol table lookup, but store
in mixed case (for IRPC expansion). Note... as far as I remember, this
was also the Intel Assembler behaviour, but
it has been a long time... For macros, we should strive to be as
consistent as possible! One case-fold too many...
and there may be a macro that cannot be expressed! But... in this case,
not that A evals to 7, and to force that
down one macro expansion, use %A, which is replaced with 7 -- her is
the example:
mymac macro p
db '&p'
endm
mymac %A
which results in:
db '7'
because... %A replaces %A with 7, which is then passed to mymac... This
can be a life-saver in macros, because x set x+1
then macrocall %x passes the value of X, not the symbol. Thus allowing
us to implement stacks, and data structures
in macro. But... this also implies that symbol and SYMBOL should be the
same. Except... for IRPC (as seen above). Note
also that '¶m' in the macro needs to recover the case of each of
the characters.
The macro code itself should, in general, not convert to upper case --
can you give me that actual problematic
macro for XYBASIC?
Thanks,
Fred Weigel
…On Mon, 2022-10-31 at 08:36 -0700, sneakywumpus wrote:
I have locally changed the macro code to not convert to upper case.
This looks much nicer in the listing,
but causes a problem for the XYBASIC code. It has a macro "error"
with creates character constants from
parameters that are not character constants. This causes a divergence
from the code produced by MAC
(which convert everything to upper case). The programmers seem to
have thought about this, since in the
70 uses of this macro only 4 calls have lower case parameters. What
to do? Change the 4 lines in XYBASIC,
or keep the conversion the upper case in the macro code?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this
thread.Message ID: <udo-munk/z80pack/repo-
***@***.***>
|
Normally this would be called with, for example, |
|
I think the assembler is in a release candidate state now. |
|
I was thinking about moving the common stuff from sim.h into z80core as simcore.h and replace it with an |
|
Doesn't need to be configurable, the CPU bus signals are provided for FRONTPANEL only. |
|
Is there a particular reason why the Makefile's specify gcc and g++ as the compiler? |
|
While building z80pack on FreeBSD I discovered that there is a package for z80pack. This package is in |
|
I'm done with the assembler, and the simulators now compile cleanly and run on FreeBSD, |
|
I made some changes to the z80pack homepage to fix internal link rot. |
|
Are we ready for release or is something in the queue that should go into it? |
|
So far I have avoided to mess to much with the formatting of others for some reasons. Others might like the formatting they are using better and they migth want to support or at last read their code. More problematic is, if it is some library like frontpanel or the AMD MPU, these are used in multiple emulation projects. If owners of A come with one formatting, and then B come with another, what should the owner of the code do? Probably you should contact them first and ask about this. However, I'm fine with waiting for your clean ups, then this is through in the next release and verything neater. |
|
No, this are relicts from using plain old UNIX System V makefiles, can go. |
|
I'd like to rename memory.[hc] to memsim.[hc] (like iosim) to get rid of the conflict with <memory.h> and -iquote . |
|
Fine with me, this are just names I used when it was implemented, more logical names will help others. |
|
In my quest to make z80pack installable I'm intending to make FRONTPANEL runtime opt-out and HAS_NETSERVER runtime opt-in, i.e. an option '-F' to disable the front panel and '-p ' to disable the front panel and start a net server at port . Leaving out FRONTPANEL and HAS_NETSERVER from sim.h would still completely exclude the corresponding code. Opinions? |
|
Looked through the code for IMSAI, can easily be fixed. Harddisk needs separate handling is not a floppy disk, so needs to go out of the disks[] array. Then all this #ifdef LARGEDISK can go, no one wants a system without a hard disk. Also all this #ifdef HAS_DISKMANAGER can go, we always use it. |
|
Just testing, after the latest changes I cannot access disks/drivei.dsk on the IMSAI anymore at all: A>dir i: |
|
Forgot to make newest bits, still was running the old code with HD disabled because diskmanager, looks fine now. |
|
Copyright and history entry in imsai-fif.[ch] need update. |
|
The 8080/Z80-core source code is starting to look messy (yours truly ducks into a corner...), and I'm inclined to, as you suggested, implemented a second selectable set of cores more optimized for size/speed and clean-up the original ones with only the UNDOC_*/FAST_BLOCK options remaining. |
|
No problem, you see what I meant. Completely separated cores would be better, then one can have a readable and easy to understand/debuggable one, while others can be more advanced or optimized for some special purpose. |
|
Implementing the undocumented flags is completely useless. All one can do is PUSH AF and then look at the bits, of course there are no instructions that can branch on them, or anything. The only effect it has is a huge pile of useless code consuming memory and time, to make one instruction exerciser happy. Way back then I also had the discussion with Frank Cringle, who did understand my point and agreed to make the test of the undocumented flag bits an option and not a must. Not needed, not useful, can go if you ask me. Maybe wait a while to hear other opinions. |
|
The undocumented instructions I had implemented were those really used by some old software, TDL mostly did this. I added one after another until there was no software anymore that would trap. So same here, instructions that never ever are used by anything waste memory and worse, time to keep them working correct. |
|
In cpmsim the measured runtime cannot be correct: System halted I typed a few commands, and sure needed several seconds for that, I am not this fast ;-) |
|
Ah, is corrected for the time the busy wait sleeped the CPU. |
|
On the IMSAI: System halted This is not possible. Happens if one resets the CPU from front panel. Probably because reset_cpu() sets R to 0. |
Uh oh!
There was an error while loading. Please reload this page.
There have been so many improvements and additions since the 1.37 release, I really would like to create the 1.38 final release from the development branch in the near future. If you still need to get anything into 1.38-dev please discuss here, so that I get an idea when I can start preparing the release, thanks.
All reactions