flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Non-x86 architectures > FASM for SINCLAIR ZX series, ZX BASIC, retro computers

Author
Thread Post new topic Reply to topic
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
FASM for SINCLAIR ZX series, ZX BASIC, retro computers
Here is a version for the development of mixed Z80 assembler and ZX BASIC programming for SINCLAIR's ZX computer series, 8 bit retro computers of the 80ies. As this is very special I will explain it only shortly here and make a link to the sinclair retro forum for more information.

But I think this is the best place to post the source. It is mainly based on the FASM Z80 version and some features are available in the WIN IDE only, like use of audio transfer of programs to SINCLAIR computers with the onboard sound card or use of the well known ZX emulator and the listing on keypress. Some nice features.

The programming with mixed Z80 assembler and ZX BASIC can be used with the command line tools as well. I prefer the development in the small IDE.

ZX BASIC is quite new and by now only a few statements are supported but more will be added soon. The version FASMW-ZX supports following clients:

Sinclair ZX80
Sinclair ZX81
Sinclair ZX Spectrum (planned)

in just one version.
Future tools for development are planned to be added as well.

More information and a tutorial will be found here at the retro forum:

http://www.sinclairzxworld.com/viewtopic.php?f=6&t=1064

Have fun. Wink


Description: Font for support of Sinclair graphic charset
Download
Filename: FASMW-ZX_AddOns.zip
Filesize: 184.37 KB
Downloaded: 273 Time(s)

Description: Source version of ZX-IDE based on flatassembler, target Z80 cpu and Sinclair ZX80/ZX81 (BASIC and assembly support)
Download
Filename: FASM-ZX.zip
Filesize: 676.52 KB
Downloaded: 268 Time(s)



Last edited by shutdownall on 02 Mar 2014, 12:57; edited 3 times in total
Post 04 Feb 2013, 18:00
View user's profile Send private message Send e-mail Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1171
Location: Unknown
Stupid post removed.


Last edited by HaHaAnonymous on 28 Feb 2015, 21:44; edited 1 time in total
Post 04 Feb 2013, 18:04
View user's profile Send private message Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
Yes has been replaced. You have been to fast.
Post 04 Feb 2013, 18:05
View user's profile Send private message Send e-mail Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1171
Location: Unknown
Stupid post removed.


Last edited by HaHaAnonymous on 28 Feb 2015, 21:44; edited 1 time in total
Post 04 Feb 2013, 18:05
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1571
Location: Ukraine
@sinclairzxworld.com:

Quote:
403 FORBIDDEN!

Either the address you are accessing this site from has been banned for previous malicious behavior or the action you attempted is considered to be hostile to the proper functioning of this system.

The detected reason(s) you were blocked are:
ukrtel, forum spambots (HN-0007). Problematic Russian Netblock (IP-043).

Your IP, and Domain Name (if resolvable) has been logged to a local honeypot, along with the referring page (if any), QUERY, POST, User Agent, time of access, and date. Please either 1. Stop the bad behavior, or 2. Cease accessing this system.
.....


Very Happy
Post 04 Feb 2013, 19:54
View user's profile Send private message Visit poster's website Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1171
Location: Unknown
Stupid post removed.


Last edited by HaHaAnonymous on 28 Feb 2015, 21:43; edited 1 time in total
Post 04 Feb 2013, 21:17
View user's profile Send private message Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
@shoorick

Sorry - the site admin had some serious reoccuring problems with some idiots selling t-shirts over that forum. So I know they did block some ip addresses. If you are interested in this forum you maybe could use an anonymous service / ip address.
Post 04 Feb 2013, 21:35
View user's profile Send private message Send e-mail Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1571
Location: Ukraine
i see Smile just ukrtelecom - it's about whole Ukraine, at least half of it Wink
i just have some Z80 cpus and self-made (not by me) ZX-Spectrum clone, so i think maybe when i'll be too old with nothing to do, i'll try to do something with them Smile
Post 05 Feb 2013, 05:48
View user's profile Send private message Visit poster's website Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
Maybe you are the bad guys on the internet. Cool
Only joking - I complained one year ago as he did same for half of germany.
Shocked
Post 05 Feb 2013, 09:42
View user's profile Send private message Send e-mail Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1571
Location: Ukraine
Razz
could you post any simple example of writing pure binary for z80 here?
Post 05 Feb 2013, 14:05
View user's profile Send private message Visit poster's website Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
There is a ZX81DEMO.ASM included (in IDE/FASMW folder).

Here is another example. It's combination of ZX BASIC and Z80 assembler.

Code:

        10      REM 'Testprogram USR with line numbers'

        20      REM _asm
                LD  A,,'Z'
                RST $10
                LD  A,,'X'
                RST $10
                LD  A,,'8'
                RST $10
                LD  A,,'1'
                RST $10
                RET
                END _asm

        30      RAND USR #20





Here is a complete program:


Code:

format zx81
;labelusenumeric
;LISTOFF

        ; hardware options to be set and change defaults in ZX81DEF.INC
        MEMAVL     =       MEM_16K         ; can be MEM_1K, MEM_2K, MEM_4K, MEM_8K, MEM_16K, MEM_32K, MEM_48K
                                           ; default value is MEM_16K
        DFILETYPE  EQU     COLLAPSED       ; COLLAPSED or EXPANDED
        STARTUPMSG EQU    'CREATED WITH ZX81-IDE' ; any message will be shown on screen after loading, max. 32 chars

        include 'SINCL-ZX\ZX81.INC'           ; definitions of constants
;LISTON

AUTORUN:
10      REM ONLY SMALL TEST PROGRAM

20      REM _asm

        LD  A,$10
        LD  B,(HL)
        LD  C ,(IX)
        INC BC
        RET
        AND     BC

        END _asm

30      RAND USR #20

40      REM '(C) by PokeMon'

        include 'SINCL-ZX\ZX81POST.INC'          ; include D_FILE and needed memory areas

assert ($-MEMST)<MEMAVL
; end of program


Post 05 Feb 2013, 15:10
View user's profile Send private message Send e-mail Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
There is the same tutorial on a german Sinclair related forum but you have to translate yourself to english. But maybe no problem with accessing that forum.

http://forum.tlienhard.com/phpBB3/viewtopic.php?f=2&t=802 Cool
Post 05 Feb 2013, 15:17
View user's profile Send private message Send e-mail Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1571
Location: Ukraine
now i see: you hide zx version deep in folders Smile

there similar:

Quote:
Information

Du wurdest auf diesem Board dauerhaft gesperrt.

Bitte kontaktiere die Board-Administration, um weitere Informationen zu erhalten.

Deine IP-Adresse wurde gesperrt.

, but do not worry: i'm interesting in pure Z80 programming, maybe i'll made a simple board with it. my best-known is i8080A, but it needs 3 power supplies and eats 1Watt (not a best choise nowdays Very Happy )

btw, you may find something there: zx.pk.ru

it is in russian, but same you may translate it worse/better to english with google, finally, if you occasionaly ask there anything in english, i'm sure you will get an answer Wink

regards!
Post 05 Feb 2013, 15:39
View user's profile Send private message Visit poster's website Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich

shoorick wrote:
now i see: you hide zx version deep in folders Smile



I am not sure what you mean, I just use includes for some ZX related stuff.
Anyway you could use the Zilog Z80 version which I posted here as well.

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

By now, I did not port all undocumented Z80 instructions written from Sean Young. These were never launched official from Zilog. And there are some new instructions for the Z8400 I think.

http://www.myquest.nl/z80undocumented/z80-documented-v0.91.pdf

I could integrate in future but do not have too many time by now. So could take a few weeks.
Post 06 Feb 2013, 10:00
View user's profile Send private message Send e-mail Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1571
Location: Ukraine
thanks!
i have found zx81rom.asm and was able to assemble it: it's enough for me, as i can write plain asm and make binary with it Wink i'm not sure if i will use undocumented commands, and if my cpus are supporting them: i have z80 by SHARP, original Z80, unknown z80 (just "Z80A" written on it) and U880 soldered-out from Robotron printer (you must know what is it, not sure if it is alive).
Post 06 Feb 2013, 10:25
View user's profile Send private message Visit poster's website Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich

shoorick wrote:
thanks!
i have found zx81rom.asm and was able to assemble it: it's enough for me, as i can write plain asm and make binary with it Wink i'm not sure if i will use undocumented commands, and if my cpus are supporting them: i have z80 by SHARP, original Z80, unknown z80 (just "Z80A" written on it) and U880 soldered-out from Robotron printer (you must know what is it, not sure if it is alive).



Maybe you find the listing feature (CTRL-F 8 ) helpful when developping. It is opened in a new tab in the IDE (if you use the WIN IDE).

The listing could be switched on an off with
;LISTOFF
;LISTON
used at any time in the source to get a more useful listing with the parts you are working on.
Post 06 Feb 2013, 10:35
View user's profile Send private message Send e-mail Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1571
Location: Ukraine
yes! i noticed that! Smile
Post 06 Feb 2013, 12:59
View user's profile Send private message Visit poster's website Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 518
Location: Munich
New release version of FASMW-ZX added with now full support of
* Z80 assembly
* ZX80 BASIC and/or assembly (can be mixed)
* ZX81 BASIC and/or assembly (can be mixed)

The graphic chars are supported now and to use they can be activated with graphic mode (ALT+9) in any window of the IDE and simply picked by clicking on them. For this feature, it is necessary to install the font SinclairZX.ttf which is provided.

So the first posting was updated with the latest source version.

More information can be found in the tutorial thread on sinclairzxworld forum:
http://www.sinclairzxworld.com/viewtopic.php?f=6&t=1064
Post 02 Mar 2014, 13:01
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.