Developing for Lambda 8300 with emulator and assembler: NO$ZX 2.0

Software and Games for the Lambda 8300 / Power 3000 Computer
Post Reply
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Developing for Lambda 8300 with emulator and assembler: NO$ZX 2.0

Post by mrtinb »

Developing for the Lambda 8300 is not as easy as developing for the ZX81.
  • I havn't found an assembler, that runs on the Lambda 8300
  • Few emulators support Lambda 8300 compared to ZX81
There is not many emulators and assemblers that support Lambda 8300, but the emulator NO$ZX 2.0 does.

There's even a built-in assembler in NO$ZX.

To run this code in NO$ZX:
  1. Under Options > Emulator Setup select Sinclair ZX Model: Lambda 8300
  2. Select Utility > Edit Ascii File
  3. Paste source from clipboard with Edit > Paste from Clipboard
  4. F9 compiles the code, and saves as filename.BIN
  5. Press ESC to close the popup
  6. F9 starts the emulator
  7. Type

    Code: Select all

    LOAD""
    (" is Shift 5)
  8. Select the filename.BIN to load into emulator
  9. Now you can start the program with

    Code: Select all

    RAND USR 17307
This code has routines for displaying chars and whole text strings. It positions the cursor and reads the keyboard.

And on top of it all, it works with both versions of Lambda 8300, even though their ROMs are quite different.

So now, good luck developing for the Lambda 8300

Code: Select all

.z80
org 16393
;=================================================
; Header for Lambda 8300 don't edit
;=================================================
 db  0FFh, 07Dh, 040h, 096h, 043h, 07Eh, 040h

vars:   dw lastbyte

 db  000h, 000h

eline:  dw afterlast

 db  0DEh, 043h, 03Bh
 db  040h, 0DFh, 043h, 0DFh, 043h, 080h, 05Dh, 040h
 db  019h, 002h, 000h, 000h, 0BFh, 0FDh, 007h, 037h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 034h
 db  01Bh, 000h, 000h, 0DBh, 0F8h, 000h, 0F0h, 03Ch
 db  021h, 018h, 040h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 076h, 000h, 000h, 000h, 000h
 db  000h, 000h, 084h, 000h, 000h, 000h, 084h, 0A0h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 080h, 000h, 076h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 076h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 076h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 076h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  076h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 076h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 076h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 076h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 076h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 076h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 076h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 076h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  076h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 076h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 076h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 076h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 076h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 076h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 076h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 076h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  076h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 076h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 076h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 076h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
 db  000h, 000h, 000h, 000h, 076h

lineno: db  000h, 00Ah
length: dw  ffbyte - rem
rem:    db  0EAh

;=================================================
; Here starts your assembly
;=================================================
	ld a,15		;ghost
	call printchar
	ld a,0		;space
	call printchar

	ld de,textstring
	ld bc,7		;length
	call printstring

	ld a,0		;space
	call printchar
	ld a,15		;ghost
	call printchar

	ld b,5
	ld c,10
	call setcursor
	ld a,12		;spider
	call printchar

	ld hl,0FDFBh	;Q key
	call waitforkey

	ret

textstring:
	db 53, 55, 42, 56, 56, 0, 54

printchar:
	ld b,a
	ld a,(999)
	cp 23
	ld a,b
	call z,printoldlambda
	call nz,printnewlambda
	ret

printoldlambda:
	push af
	rst 010h
	pop af
	ret
printnewlambda:
	rst 018h
	ret

printstring:
	ld a,(999)
	cp 23
	call z,prstroldlambda
	call nz,prstrnewlambda
	ret

prstroldlambda:
	push af
	call 0CF6h
	pop af
	ret
prstrnewlambda:
	call 01543h
	ret

setcursor:
	ld a,(999)
	cp 23
	call z,cursoroldlamda
	call nz,cursornewlambda
	ret

cursoroldlamda:
	push af
	call 0A94h
	pop af
	ret
cursornewlambda:
	call 014B8h
	ret

waitforkey:
	ld bc,(04025h)	;LAST_K
	and a
	push hl
	sbc hl,bc
	pop hl
	jr nz,waitforkey
	ret
;=================================================
; Footer for Lambda 8300 don't edit
;=================================================
endofline: db  076h
ffbyte:    db  0FFh
lastbyte:  db  080h
afterlast:
end
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: Developing for Lambda 8300 with emulator and assembler: NO$ZX 2.0

Post by David G »

NO$ZX works very differently than other emulators, it took me a while to figure it out. I used the setting "Lambda 8300 (ZX81 revision)" as the other one (after loading the BIN file) just put random characters on the screen

The 8300 seems OK but it requires a lot more typing like spell out L-O-A-D instead of just pressing the LOAD key
BIN_screenshot.jpg
BIN_screenshot.jpg (3.51 KiB) Viewed 13989 times
The Q key quits the program but so far I haven't discovered any other keys to move the spider?
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Developing for Lambda 8300 with emulator and assembler: NO$ZX 2.0

Post by mrtinb »

It’s a very basic example, that only displays the text and wait for the Q key. The reason it has so many lines, is to make it work on both ROM versions. And the header of Lambda 8300 is huge as it also is on the ZX81.

The example program was an inspiration to start coding for the Lambda 8300, and to show how to make software that works for both ROM versions.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: Developing for Lambda 8300 with emulator and assembler: NO$ZX 2.0

Post by David G »

thanks. slowly i am getting to understand it. How can I load the other ROM you mentioned?

here is my assembly language test app for Lambda 8300
works OK on NO$ZX v2.0 for Windows using setting "Lambda 8300 (ZX81 revision)"

movedot_LAMBDA_2K_nozx.asm
Assembly file for ZX$NO v2.0
(9 KiB) Downloaded 316 times
movedot_LAMBDA_2K_nozx.BIN.p
(1.14 KiB) Downloaded 293 times

movedot_LAMBDA_2k_zxide.asm
Assembly and BASIC file for ZX-IDE
(7.84 KiB) Downloaded 298 times
movedot_LAMBDA_2k_zxide.p
(1.14 KiB) Downloaded 308 times
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Developing for Lambda 8300 with emulator and assembler: NO$ZX 2.0

Post by mrtinb »

These are the Lambda 8300 ROMs I know about:

viewtopic.php?p=31682#p31682

And this online emulator supports both old and new ROM for the Lambda 8300. (Use the buttons 'Lambda1' and 'Lambda2').

http://rullf2.xs4all.nl/jszeddy/jszeddy.html
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Developing for Lambda 8300 with emulator and assembler: NO$ZX 2.0

Post by mrtinb »

Trying both versions in the JSZeddy emulator, the program only works on the new Lambda ROM (The one that says READY). When RUN on the old ROM, is displays garbage on the screen, when pressing the arrow keys.

The contents of the D-file inside the file, is only displayed on the old ROM with the IDE-version of the program.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Post Reply