Skip to content

Commit 83f3cf4

Browse files
authored
Merge pull request #14 from markdryan/markdryan/v11
Updates for the v11 release
2 parents adaaeff + f7dda42 commit 83f3cf4

32 files changed

+4920
-132
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ SAIMPORT.X
2323
SAEXPORT.X
2424
SAMAKE
2525
SAMAKE.X
26+
SAMAC
2627
build.sh
2728
compile.sh
2829
!build/48/specasm/
2930
!bas/48/*.TAP
3031
!bas/128/*.TAP
3132
!bas/*.TAP
3233
build/48/specasm/release/
34+
build/128/specasm/release/
3335
!build/next/specasm/
3436
!build/128/specasm/
3537
build/next/specasm/release/
@@ -40,3 +42,4 @@ build/next/unit/tests/
4042
examples/hello/hello
4143
examples/hello/hello.x
4244
.DS_Store
45+
.vscode

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
# Specasm
22

3-
Specasm is a Z80 assembler designed to run on the 48k and 128k ZX Spectrum and the ZX Spectrum Next. It requires an SD card solution running ESXDOS 0.87 or greater to function on the 48Kb and 128Kb ZX Spectrum. For detailed information about how Specasm works, please see the [documentation](https://github.com/markdryan/specasm/blob/master/docs/specasm.md). To get started, carry on reading.
3+
Specasm is a Z80 assembler designed to run on the 48k and 128k ZX Spectrums and the ZX Spectrum Next. It requires an SD card solution running ESXDOS 0.87 or greater to function on the 48Kb and 128Kb ZX Spectrum. For detailed information about how Specasm works, please see the [documentation](https://github.com/markdryan/specasm/blob/master/docs/specasm.md). To get started, carry on reading.
44

55
## Getting Started
66

77
[Download](https://github.com/markdryan/specasm/releases) the latest release of Specasm appropriate for your Spectrum and unzip the contents of the file into the root directory of your SD card.
88

99
> [!TIP]
10-
> There are three different Zip files available, specasm48.zip for the 48kb, specasm128.zip for the 128kb Spectrum, and specasmnext.zip for the ZX Spectrum Next. You must download the appropriate version for your machine.
10+
> There are two different Zip files available, specasm.zip for the 48kb and 128kb Spectrums, and specasmnext.zip for the ZX Spectrum Next. The specasm.zip file contains separate binaries and install scripts for both the 48kb and 128kb versions. You must download the appropriate version for your machine.
1111
12-
You should now have a folder in your root directory called SPECASM. It should look something like this if you downloaded specasm48.zip
12+
You should now have a folder in your root directory called SPECASM. It should look something like this if you downloaded specasm.zip
1313

1414
![Installing](/docs/install.png)
1515

16-
Now navigate to the INSTALL.BAS file, which is a BASIC program, and press **ENTER** to execute it. On the 48kb or 128kb Spectrum this will use ESXDOS's **.launcher** command to set up some command line short cuts for the tap files in the SPECASM directory. It will also copy some executables to the /bin folder. On the ZX Spectrum Next it will copy the various executable programs that compose Specasm to the /dot folder.
16+
To install Specasm you need to run a short BASIC program. Run INST48.BAS when installing on a 48kb Spectrum, INST128.BAS when installing on a 128kb Spectrum and INSTALL.BAS when running on the Next. Navigate to the appropriate install file and press **ENTER** to execute it. On the 48kb or 128kb Spectrum this will use ESXDOS's **.launcher** command to set up some command line short cuts for the tap files in the SPECASM directory. It will also copy some executables to the /bin folder. On the ZX Spectrum Next it will copy the various executable programs that compose Specasm to the /dot folder.
17+
18+
> [!TIP]
19+
> Note on previous releases of Specasm, there were separate zip files just for the 48kb and the 128kb Spectrums and users ran a BASIC script called INSTALL.BAS to install Specasm on these machines. From release v11 onwards, the zip files for the 48kb and 128kb Spectrums have been combined and you must run INST48.BAS or INST128.BAS to install the correct version. If you run the wrong install program by mistake just run REMOVE.BAS to uninstall Specasm and then execute the correct installer.
1720
1821
## Reinstalling Specasm
1922

asm/sald128/sald128.s

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dw calib
88
dw bank0
99
dw bank4
1010
dw bank6
11+
dw bank3
1112
dw bank1
1213

1314
.calib
@@ -32,8 +33,10 @@ dw bank1
3233
align 4
3334
.bank128
3435
db 16,20,22,17
36+
db 19
3537
.bankPlus2a
3638
db 16,17,19,20
39+
db 22
3740

3841
.bank0
3942
ld c, 0
@@ -44,10 +47,12 @@ db 16,17,19,20
4447
.bank6
4548
ld c, 2
4649
jr switchBank
50+
.bank3
51+
ld c, 4
52+
jr switchBank
4753
.bank1
4854
ld c, 3
4955

50-
5156
.switchBank
5257
ld a, (=cpuid)
5358
cp 126

bas/128/INST128.BAS

1.1 KB
Binary file not shown.

bas/128/specld.tap

50 Bytes
Binary file not shown.
File renamed without changes.

bas/next/MAC.BAS

1017 Bytes
Binary file not shown.

build/128/specasm/Make.include

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ editor_buffers.o: editor_buffers.c editor_buffers.h line.h \
5858
error.h
5959
scratch.o: scratch.c scratch.h line.h error.h
6060
analysis_banked.o: analysis.c state.h state_base.h line_common.h line.h error.h strings.h
61+
doc_banked.o: doc.c doc.h editor.h error.h line.h line_common.h peer.h peer_zx.h scratch.h util_print_zx.h
62+
descra2l_banked.o: descra2l.c descra2l.h
63+
descrm2z_banked.o: descrm2z.c descrm2z.h
6164

6265
%.o: %.c
6366
zcc $(CFLAGS) -o $@ -c $<

build/128/specasm/Makefile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ editor_extra_banked.o: editor_extra.c
3737
analysis_banked.o: analysis.c
3838
$(CC) $(CFLAGS) -DSPECASM_128_BANKED -o $@ --codesegBANK_6 --constsegBANK_6 --datasegBANK_6 -c $<
3939

40+
doc_banked.o: doc.c
41+
$(CC) $(CFLAGS) -DSPECASM_128_BANKED -o $@ --codesegBANK_3 --constsegBANK_3 --datasegBANK_3 -c $<
42+
43+
descra2l_banked.o: descra2l.c
44+
$(CC) $(CFLAGS) -DSPECASM_128_BANKED -o $@ --codesegBANK_3 --constsegBANK_3 --datasegBANK_3 -c $<
45+
46+
descrm2z_banked.o: descrm2z.c
47+
$(CC) $(CFLAGS) -DSPECASM_128_BANKED -o $@ --codesegBANK_3 --constsegBANK_3 --datasegBANK_3 -c $<
48+
4049
clipboard.o: clipboard.c
4150
$(CC) $(CFLAGS) -DSPECASM_128_BANKED -o $@ -c $<
4251

@@ -67,7 +76,10 @@ SPECASM = \
6776
ld_parse_banked.o \
6877
editor_banked.o \
6978
editor_extra_banked.o \
70-
analysis_banked.o
79+
analysis_banked.o \
80+
doc_banked.o \
81+
descra2l_banked.o \
82+
descrm2z_banked.o
7183

7284
specasm_bare.tap: $(SPECASM)
7385
$(CC) $(CFLAGS) -zorg=32768 -m -startup=31 -o $@ $^ -pragma-include:zpragma.inc $(CZFLAGS)
@@ -80,8 +92,9 @@ specasm.tap: specasm_bare.tap sald128/sald128
8092
z88dk-appmake +zx -b specasm_bare_BANK_0.bin -o bank0.tap --org 49152 --noloader
8193
z88dk-appmake +zx -b specasm_bare_BANK_4.bin -o bank4.tap --org 49152 --noloader
8294
z88dk-appmake +zx -b specasm_bare_BANK_6.bin -o bank6.tap --org 49152 --noloader
95+
z88dk-appmake +zx -b specasm_bare_BANK_3.bin -o bank3.tap --org 49152 --noloader
8396
z88dk-appmake +zx -b sald128/sald128 -o sald128.tap --org 32768 --noloader
84-
cat ../../../bas/128/specld.tap sald128.tap bank0.tap bank4.tap bank6.tap specasm_bare.tap > specasm.tap
97+
cat ../../../bas/128/specld.tap sald128.tap bank0.tap bank4.tap bank6.tap bank3.tap specasm_bare.tap > sa128.tap
8598

8699
clean:
87100
- rm -rf specasm *.zip -rf unitzx sald128
@@ -91,12 +104,15 @@ clean:
91104
release:
92105
- rm -rf release
93106
mkdir -p release/specasm
94-
cp specasm.tap release/specasm
107+
cp sa128.tap release/specasm
95108
cp ../../48/specasm/salink.tap release/specasm
109+
cp ../../48/specasm/specasm.tap release/specasm
110+
cp ../../48/specasm/SAMAC_CODE.bin release/specasm/SAMAC
96111
cp ../../../COPYING release/specasm
97112
sed 's/```//g' ../../../docs/specasm.md > release/specasm/specasm.txt
98113
cp ../../48/specasm/SAMAKE ../../48/specasm/SAIMPORT ../../48/specasm/SAEXPORT ../../48/specasm/*.X release/specasm
99-
cp ../../../bas/48/INSTALL.BAS release/specasm
114+
cp ../../../bas/128/INST128.BAS release/specasm
115+
cp ../../../bas/48/INST48.BAS release/specasm
100116
cp ../../../bas/48/REMOVE.BAS release/specasm
101117
../../../buildlib.sh `realpath release` 128 specasm
102-
cd release && zip -r specasm128.zip specasm
118+
cd release && zip -r specasm.zip specasm

build/48/specasm/Make.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ queued_files.o: queued_files.c peer.h error.h peer_zx.h \
5454
editor_buffers.o: editor_buffers.c editor_buffers.h line.h \
5555
error.h
5656
scratch.o: scratch.c scratch.h line.h error.h
57+
samac.o: samac.c error.h line.h scratch.h state.h state_base.h strings.h
5758

5859
%.o: %.c
5960
zcc $(CFLAGS) -o $@ -c $<

0 commit comments

Comments
 (0)