ZX81-IDE Software Development Tool, IDE

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Sun Sep 23, 2012 11:16 pm

Well sometimes waiting can solve problems. :mrgreen:
Flatassembler has a new feature in version 1.71 which is nearly 99% of my codeblock feature.

Now it is possible to define virtual sections which can be copied anywhere at code output.
So I decided to port the IDE to newest version 1.71 next week.
Could await a new version with this feature.

Code: Select all

use16
format binary as "p"

db 100h dup(0)

codeblocktarget:
 db le-lb dup(0)


virtual at 1000h
  lb:
  my_space::
    db 'My message'
    db 0ffh
    dw lb
  le:
end virtual


repeat le-lb
 load a byte from my_space:1000h+%-1
 store byte a at codeblocktarget+%-1
end repeat
8-)

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Sun Dec 30, 2012 2:56 am

Just a first update with the newly flatassembler version 1.71 which has some extensions using virtual address spaces for improvement of programming assembler and ZX81 BASIC together. Not quite finished but prepared to be fixed soon. ;)
FASMWZ80.zip
(134.25 KiB) Downloaded 142 times

Rink
Posts: 165
Joined: Wed Jun 27, 2012 5:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by Rink » Sun Dec 30, 2012 10:37 am

Any chance of a Mac OS version? I'm in the process of moving all my retro code development to an old PowerPC iMac (just for fun really) so it'd be cool to have this on there, running on Panther or Tiger. :)

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Sun Dec 30, 2012 1:55 pm

It is available as command line version for WIN32, DOS, LINUX and as LIBC.
The IDE is available for WIN32 and DOS.
But did not integrate special functions like listing or transfer via Audio in that DOS IDE.

Maybe you could use something like WINE for Mac.

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Thu Jan 17, 2013 12:59 am

So here is a new version with some new and nice features. In the german forum I started a tutorial in a separate thread about the IDE and flatassembler. I will make the same here and translate from german. For getting more family with it. ;)

The most important feature in this version 1.71.01b.Z80 is the deeply integration of BASIC commands in the parser. Sounds not spectacular but is important and caused much work. There is a difference in defining BASIC structures with DEFB commands and calculate offsets and code integers by hand or if you let do the assembler all necessary work. It was a bit tricky to support Assembler and BASIC commands as you naturally would type it down and to support all syntax rules to act mostly intuitiv.

That was not the only road work. The more easy part was integration of the emulator EightyOne which can be started with the assembled source by simply pressing F8 from assembler IDE.
FASM_Screen1.jpg
FASM_Screen1.jpg (63.72 KiB) Viewed 2888 times
The name of the IDE changed from FASMWZ80 to FASMW-ZX as it not only supports Z80 assembler instructions but add the BASIC instructions too. Okay for the moment only REM and RAND USR as first part but more commands will be added soon quite fast as all internal structures available now (preprocessor to parser and parser to assembler). Shortly it will also support ZX80 programs (BASIC) as well and as I am new owner of a ZX Spectrum I plan to support Speccy too. After ZX80 I think. So the name FASMW-ZX is more suitable to what the IDE can be used for (different targets or all ZX computers from Sinclair).

The audio interface (transfer of WAV files) was modified too. A very important hint at this point: Who ever use a security / firewall package with sandbox (I use Comodo) has to switch off the sandbox at least for the FASMW-ZX.EXE or better the corresponding directory. It took me hours to find the reason for not updating the WAV files from the IDE after several changes in source. :roll: The main reason for modifying the audio interface was because it was a hidden transfer in the past which could not be stopped easily and there was no display when the transfer finishes or how long it will take (no progress bar). Due to switched off audio from putting the cable into ear plug you could not hear the end. Now you can use the system media player assigned to WAV files which will be started automatically when switching on in RUN menu. You should use Windows Media Player only by now as I found some mysterious problems with VLC player. Sounds same and has same loudness but transfer was not successful. I switched off all features for audio processing but anyway no luck. This has to be investigated in future. So I left the old hidden transfer using PlaySound in WINMM.DLL for maybe problems with external player. If you have different players you should assign Windows Media Player to WAV files manually.
FASM_Screen2.jpg
FASM_Screen2.jpg (52.19 KiB) Viewed 2888 times
The sample program ZX81DEMO.ASM was adapted to the new BASIC commands / structures.

The new features here shortly described, I will explain in a few days in the announced tutorial in more detail.

;labelusenumeric
;labelusenumeric can be used without ;labelautodetect for automatic detection of numeric labels only
=> ;labelautodetect should to be used with caution as all unknown instructions or statements will be interpreted as labels and this could confuse with possibly typos

format
format can be used now simply as format zx81 instead of binary. The used extension is ".p" as default.
And the codepage for translating ASCII to ZX charset will be used and format zx80 is prepared to be used in future.

AUTORUN
AUTORUN is now a label which could be placed directly in front of the desired BASIC line. If no AUTORUN is desired, it could be commented out or moved after the last BASIC line.

line numbers
BASIC line numbers are obeslete and from the IDE view only numeric labels. The lines are numbered automatically in steps of 10 which can be changed with the AUTOLINE <value> directive. AUTOLINE can appear multiple in the source with different desired values. Manual line numbers and automatic line numbers can be mixed free, for example to use a special line number for a BASIC line or to give a special new offset to a BASIC line. More in the tutorial.

REM
REM can be followed by any strings, numbers or characters which will be translated to ZX charset automatically. ZX pseudo instructions/functions as TAN, CHR$, LEN or similar are not supported as this would be done with real assembler instructions instead.

assembler blocks
To define an assembler block you can simply use REM followed by _asm and Z80 assembler code. The block has to be end with END _asm before a new BASIC statement can be processed. There are some more options with combination of _noedit or _hide, more in the tutorial later. There will be possibility to move assembler code to variables in future, too.

RAND
RAND is used by now only for executing code from assembler blocks (mainly from REM lines) in conjunction with function USR. After RAND USR a number or a label can follow. You all may know RAND USR 16514 which is supported. But there can be used RAND USR labelx for executing code at labelx placed somewhere in any REM assembler block. So there can be defined different entry points for the code easily with labels. Numbers and labels can be preceeded by the char #. RAND USR #120 will start assembler code of BASIC line 120 and will automatically add the offset of 5 bytes from the REM statement (line_number+line_lenght+command). The same can be done with RAND USR #label2 to start assembly code from the line with label2 (instead of a defined line number).

So that's all for now very short described. You will find more detailed examples later in the tutorial thread here. Have fun. :mrgreen:

Version 1.71.01b.Z80 (this version has been replace by 1.71.01c.Z80 which can be found in the tutorial thread, first posting).
=> viewtopic.php?f=6&t=1064
Last edited by PokeMon on Fri May 31, 2013 9:13 am, edited 1 time in total.

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Mon Feb 04, 2013 6:22 pm

As I did on the german forum, from now on you will always find the latest version of the ZX-IDE for ZX81/ZX80 development in the tutorial thread in the first posting.
viewtopic.php?f=6&t=1064

In future I will announce new versions and changes here only. ;)

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Mon Feb 04, 2013 7:07 pm

If anybody wants/needs the source, it can be downloaded here at the flatassembler forum:

http://board.flatassembler.net/topic.php?t=15062

sirmorris
Posts: 2813
Joined: Thu May 08, 2008 5:45 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by sirmorris » Mon Feb 04, 2013 11:03 pm

Wow - this is a lot to take in for my old brain :D

Thanks for all your hard work!

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Fri May 31, 2013 9:04 am

Had took some time but now there is a new version 1.71.01c.Z80 from the ZX-IDE.
The new version is support of the ZX80 system with the same simple BASIC support as for the ZX81.
So the tokens REM, RAND(OMISE) and function USR(...) is supported for writing and starting assembler programs (workframe).
I will replace the new version in the tutorial thread (first posting).

And I added a subdirectory to the EightyOne emulator (disks), which is needed to use the inbuilt debugger of EightyOne.

Next step will be full support of all BASIC statements to write more useful BASIC programs with the IDE, in the first step for the ZX81 and after same for ZX80. ;)

User avatar
PokeMon
Posts: 2225
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX81-IDE Software Development Tool, IDE

Post by PokeMon » Tue Sep 03, 2013 10:53 pm

So today I uploaded a new version of the ZX-IDE, it's now 1.71.01e.Z80 (the "d" version was skipped for this forum ;) ).
So the new version has a changed concept of BASIC and assembler context and interface between them and supports now the PRINT statement, PRINT USR e.g. and use of floating point values and all mathematical, trigonometrical and logarithmic functions (BASIC).

I will explain details tomorrow in the tutorial thread for ZX-IDE. The new version is already uploaded in the first posting of the tutorial thread.

Following BASIC statements are supported in this version:

LET
NEW
REM
RUN
CONT
EDIT
FAST
GOTO
LIST
RAND
SLOW
CLEAR
INPUT
PAUSE
PRINT


Following functions are supported:

ABS
ACS
ASN
ATN
COS
EXP
INT
LEN
RND
SGN
SIN
SQR
TAN
USR
VAL
STR$

Post Reply