ZX-IDE Tutorial for programming assembler and ZX BASIC

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

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by PokeMon »

Hi,

i think MOD would be the appropriate operator.
I think the general AND / OR functions may have been removed as there is a conflict with the BASIC functions AND / OR.
SHL / SHR is still available while SHR wouldn't help to get the lower 8 bits.

Here are some examples:

Code: Select all

                                        org $4000
                                        
0000: [4000] FF                                 db $FF
                                        test:
0001: [4001] 01 40                              dw test
0003: [4003] 40                                 db test/256
0004: [4004] 40                                 db test shr 8
0005: [4005] 01                                 db test mod 256
nollkolltroll
Posts: 325
Joined: Sat Sep 27, 2014 8:02 pm
Location: Stockholm, Sweden

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by nollkolltroll »

Thanks, that seems to do the trick.
/Adam
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by PokeMon »

There is a small bug detected today and did quite much time to check out the problem with a logic analyzer because I couldn't see the bug with my eyes.

Code: Select all

0000: [0000] DB 00                      IN A,(0)
0002: [0002] DB 00                      IN (0),A
0004: [0004] D3 00                      OUT A,(0)
0006: [0006] D3 00                      OUT (0),A
0008: [0008] ED 78                      IN A,(C)
000A: [000A] ED 79                      IN (C),A
000C: [000C] ED 78                      OUT A,(C)
000E: [000E] ED 79                      OUT (C),A
The last release of ZX-IDE doesn't care about the order of registers/values for IN and OUT but do compile different and makes from the non-official form IN (C),A a binary output for OUT (C),A. I defined now stricter rules for the syntax of in and out instructions an in the new release 1.71.01.r.z80 the wrong form is declined with a message "invalid operand". I will wait a while before posting it - maybe I or some of you find more bugs in the next time.

So be warned about possibly wrong compiled IN/OUT instructions.
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Batch file execution after compilation, ZXpand token

Post by PokeMon »

The IDE has been updated today with ZX-IDE 1.71.01.t.Z80 (06/2017) and supports following (new) command / BASIC keyword.


ZXPAND keyword

Code: Select all

ZXPAND "do something"
ZXPAND has a string as parameter and is coded the same way as LPRINT ($E1) and will be shown as LPRINT on real hardware or emulators except a ZXpand(+) is connected. For details of allowed parameters please refer to ZXpand documentation.



BATCH file after compile

The new version supports the execution of a batch file after compilation (either compile/CTRL-F9, build listing/CTRL-F8 or start emulator/F8). This batch file has the same name as the application and can be chosen different for different programs. It has to be created by the user. The batch is not called with parameters. The execution starts after compile (when compiler summary dialog box disappears). A sample is provided (ZX81DEMO.BAT).



Emulator EightyOne

There is a quite old emulator installed with ZX-IDE and only partly due to attachment size restrictions. It is recommended to update the emulator manually with the latest version which can be found here:

https://sourceforge.net/projects/eighty ... p_redirect
Last edited by PokeMon on Sun Aug 06, 2017 7:30 pm, edited 1 time in total.
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by PokeMon »

The latest version is always updated in the first post of this thread as always.
Just to let you know as somebody asked about the link ... ;)

Oh - I see, I forgot to attach. :oops:
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by Andy Rea »

Hi Karl,

I am starting to write new program for zxpand and have decided to try your IDE for the first time because it is good been able to combine assembler and basic in one source file.

I think i have come across a bug

in basic it is acceptable to use the following

PRINT "FILENAME ?"
INPUT A$
LET A$=A$+";8192"
LOAD A$

Which will load the filename file at memory address 8192, however the compiler is not accepting A$ as an acceptable operand for the keyword LOAD

regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by PokeMon »

I will check ...
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by Andy Rea »

Thanks Karl much appreciated, it's not a major problem as i have shifted the LOAD into a subroutine and place it at the end of the program so upon load i just edit that line and all is good

i am very much liking the assembler, been able to mix assemble and basic is a really useful.

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
ilyad731214
Posts: 15
Joined: Thu Jul 27, 2017 9:43 am

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by ilyad731214 »

Hi.
Is it known problem, that when trying to load a program with a .p extension to a ZX IDE, the disassembly does not take place? I tried loading different programs with the same effect. Maybe I'm doing something wrong?
ZX-81, ZX-Pand AY, 48k "Rubber", 48K+, 128K + "Toastrack", +2 "grey" 1024k Profi, Masakrator FM, DivIDE 2K11, ZX Evolution rev. C, ZX-Uno, C64, C16 64K, Plus4 + 1541 Ultimate II + SD2IEC
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: ZX-IDE Tutorial for programming assembler and ZX BASIC

Post by sirmorris »

I think this is expected.
Post Reply