Move 8086 assembler from B730 to B30
Also, move doc to doc/asm.txt. Also, fix the pcat recipe which was broken since the overlay change. I hadn't noticed it because I didn't have to rebuild the MBR.
This commit is contained in:
parent
91f79d1131
commit
b21be43535
5
blk/001
5
blk/001
@ -1,6 +1,7 @@
|
|||||||
MASTER INDEX
|
MASTER INDEX
|
||||||
|
|
||||||
005 Z80 assembler 30-99 unused
|
005 Z80 assembler 030 8086 assembler
|
||||||
|
50-99 unused
|
||||||
100 Block editor 120 Visual Editor
|
100 Block editor 120 Visual Editor
|
||||||
160-259 unused 260 Cross compilation
|
160-259 unused 260 Cross compilation
|
||||||
280 Z80 boot code 350 Core words
|
280 Z80 boot code 350 Core words
|
||||||
@ -8,5 +9,5 @@ MASTER INDEX
|
|||||||
440-519 unused 520 Fonts
|
440-519 unused 520 Fonts
|
||||||
550-649 unused
|
550-649 unused
|
||||||
650 AVR assembler 690 AVR SPI programmer
|
650 AVR assembler 690 AVR SPI programmer
|
||||||
700-729 unused 730 8086 assembler
|
700-799 unused
|
||||||
800 8086 boot code
|
800 8086 boot code
|
||||||
|
4
blk/280
4
blk/280
@ -1,8 +1,8 @@
|
|||||||
Z80 boot code
|
Z80 boot code
|
||||||
|
|
||||||
This assembles the boot binary. It requires the Z80 assembler
|
This assembles the boot binary. It requires the Z80 assembler
|
||||||
(B200) and cross compilation setup (B260). It requires some
|
(B5) and cross compilation setup (B260). It requires some
|
||||||
constants to be set. See B420 for details.
|
constants to be set. See doc/bootstrap.txt for details.
|
||||||
|
|
||||||
RESERVED REGISTERS: At all times, IX points to RSP TOS and BC
|
RESERVED REGISTERS: At all times, IX points to RSP TOS and BC
|
||||||
is IP. SP points to PSP TOS, but you can still use the stack
|
is IP. SP points to PSP TOS, but you can still use the stack
|
||||||
|
15
blk/730
15
blk/730
@ -1,15 +0,0 @@
|
|||||||
8086 assembler
|
|
||||||
|
|
||||||
Work in progress. Load with "750 LOAD".
|
|
||||||
|
|
||||||
Mnemonics are followed by argument types. For example, MOVri,
|
|
||||||
moves 8-bit immediate to 8-bit register.
|
|
||||||
|
|
||||||
'r' = 8-bit register 'x' = 16-bit register
|
|
||||||
'i' = 8-bit immediate 'I' = 16-bit immediate
|
|
||||||
's' = SREG register
|
|
||||||
|
|
||||||
Mnemonics that only have one signature (for example INT,) don't
|
|
||||||
have operands letters.
|
|
||||||
|
|
||||||
For jumps, it's special. 's' is SHORT, 'n' is NEAR, 'f' is FAR.
|
|
29
doc/asm.txt
29
doc/asm.txt
@ -5,10 +5,10 @@ There are sections, below, for each supported architectures, but
|
|||||||
you should read this first section first to be familiar with
|
you should read this first section first to be familiar with
|
||||||
those common, basic principles)
|
those common, basic principles)
|
||||||
|
|
||||||
Words in the Z80 assembler (B5) allow you to assemble z80 bin-
|
Words in the Z80 assembler, loaded with "5 LOAD" allow you to
|
||||||
aries. Being Forth words, opcode assembly is a bit different
|
assemble z80 binaries. Being Forth words, opcode assembly is a
|
||||||
than with a typical assembler. For example, what would tradi-
|
bit different than with a typical assembler. For example, what
|
||||||
tionally be "ld a, b" would become "A B LDrr,".
|
would traditionally be "ld a, b" would become "A B LDrr,".
|
||||||
|
|
||||||
Those opcode words, of which there is a complete list below, end
|
Those opcode words, of which there is a complete list below, end
|
||||||
with "," to indicate that their effect is to write (,) the cor-
|
with "," to indicate that their effect is to write (,) the cor-
|
||||||
@ -138,3 +138,24 @@ RR RRC SRL RRA RRCA
|
|||||||
CALL RST DJNZ
|
CALL RST DJNZ
|
||||||
DI EI EXDEHL EXX HALT
|
DI EI EXDEHL EXX HALT
|
||||||
NOP RET [,c] RETI RETN SCF
|
NOP RET [,c] RETI RETN SCF
|
||||||
|
|
||||||
|
# 8086 assembler
|
||||||
|
|
||||||
|
Load with "30 LOAD". As with the Z80 assembler, it is incom-
|
||||||
|
plete.
|
||||||
|
|
||||||
|
Mnemonics are followed by argument types. For example, MOVri,
|
||||||
|
moves 8-bit immediate to 8-bit register.
|
||||||
|
|
||||||
|
'r' = 8-bit register 'x' = 16-bit register
|
||||||
|
'i' = 8-bit immediate 'I' = 16-bit immediate
|
||||||
|
's' = SREG register
|
||||||
|
|
||||||
|
Mnemonics that only have one signature (for example INT,) don't
|
||||||
|
have operands letters.
|
||||||
|
|
||||||
|
For jumps, it's special. 's' is SHORT, 'n' is NEAR, 'f' is FAR.
|
||||||
|
|
||||||
|
# 8086 Instructions list
|
||||||
|
|
||||||
|
TODO
|
||||||
|
@ -18,8 +18,8 @@ blkfs: $(BLKPACK)
|
|||||||
$(STAGE):
|
$(STAGE):
|
||||||
$(MAKE) -C $(CDIR) stage
|
$(MAKE) -C $(CDIR) stage
|
||||||
|
|
||||||
mbr.bin: mbr.fs $(STAGE)
|
mbr.bin: mbr.fs $(STAGE) blkfs
|
||||||
cat mbr.fs | $(STAGE) > $@
|
cat mbr.fs | $(STAGE) blkfs > $@
|
||||||
|
|
||||||
$(TARGET): mbr.bin os.bin
|
$(TARGET): mbr.bin os.bin
|
||||||
cat mbr.bin os.bin > $@
|
cat mbr.bin os.bin > $@
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
0xff00 CONSTANT RS_ADDR
|
0xff00 CONSTANT RS_ADDR
|
||||||
0xfffa CONSTANT PS_ADDR
|
0xfffa CONSTANT PS_ADDR
|
||||||
RS_ADDR 0x80 - CONSTANT SYSVARS
|
RS_ADDR 0x80 - CONSTANT SYSVARS
|
||||||
750 LOAD ( 8086 asm )
|
30 LOAD ( 8086 asm )
|
||||||
262 LOAD ( xcomp ) 270 LOAD ( xcomp overrides )
|
262 LOAD ( xcomp ) 270 LOAD ( xcomp overrides )
|
||||||
805 820 LOADR ( 8086 boot code )
|
805 820 LOADR ( 8086 boot code )
|
||||||
353 LOAD ( xcomp core low )
|
353 LOAD ( xcomp core low )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
750 LOAD
|
30 LOAD
|
||||||
832 LOAD
|
602 LOAD
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
Loading…
Reference in New Issue
Block a user