Ver código fonte

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.
master
Virgil Dupras 3 anos atrás
pai
commit
b21be43535
21 arquivos alterados com 37 adições e 29 exclusões
  1. +3
    -2
      blk/001
  2. +2
    -0
      blk/030
  3. +0
    -0
      blk/031
  4. +0
    -0
      blk/032
  5. +0
    -0
      blk/033
  6. +0
    -0
      blk/034
  7. +0
    -0
      blk/035
  8. +0
    -0
      blk/036
  9. +0
    -0
      blk/037
  10. +0
    -0
      blk/038
  11. +0
    -0
      blk/040
  12. +0
    -0
      blk/041
  13. +0
    -0
      blk/042
  14. +0
    -0
      blk/043
  15. +2
    -2
      blk/280
  16. +0
    -15
      blk/730
  17. +0
    -1
      blk/750
  18. +25
    -4
      doc/asm.txt
  19. +2
    -2
      recipes/pcat/Makefile
  20. +1
    -1
      recipes/pcat/blk/612
  21. +2
    -2
      recipes/pcat/mbr.fs

+ 3
- 2
blk/001 Ver arquivo

@@ -1,6 +1,7 @@
MASTER INDEX

005 Z80 assembler 30-99 unused
005 Z80 assembler 030 8086 assembler
50-99 unused
100 Block editor 120 Visual Editor
160-259 unused 260 Cross compilation
280 Z80 boot code 350 Core words
@@ -8,5 +9,5 @@ MASTER INDEX
440-519 unused 520 Fonts
550-649 unused
650 AVR assembler 690 AVR SPI programmer
700-729 unused 730 8086 assembler
700-799 unused
800 8086 boot code

+ 2
- 0
blk/030 Ver arquivo

@@ -0,0 +1,2 @@
( 8086 assembler. See doc/asm.txt )
1 13 LOADR+

blk/751 → blk/031 Ver arquivo


blk/752 → blk/032 Ver arquivo


blk/753 → blk/033 Ver arquivo


blk/754 → blk/034 Ver arquivo


blk/755 → blk/035 Ver arquivo


blk/756 → blk/036 Ver arquivo


blk/757 → blk/037 Ver arquivo


blk/758 → blk/038 Ver arquivo


blk/760 → blk/040 Ver arquivo


blk/761 → blk/041 Ver arquivo


blk/762 → blk/042 Ver arquivo


blk/763 → blk/043 Ver arquivo


+ 2
- 2
blk/280 Ver arquivo

@@ -1,8 +1,8 @@
Z80 boot code

This assembles the boot binary. It requires the Z80 assembler
(B200) and cross compilation setup (B260). It requires some
constants to be set. See B420 for details.
(B5) and cross compilation setup (B260). It requires some
constants to be set. See doc/bootstrap.txt for details.

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


+ 0
- 15
blk/730 Ver arquivo

@@ -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.

+ 0
- 1
blk/750 Ver arquivo

@@ -1 +0,0 @@
1 13 LOADR+

+ 25
- 4
doc/asm.txt Ver arquivo

@@ -5,10 +5,10 @@ There are sections, below, for each supported architectures, but
you should read this first section first to be familiar with
those common, basic principles)

Words in the Z80 assembler (B5) allow you to assemble z80 bin-
aries. Being Forth words, opcode assembly is a bit different
than with a typical assembler. For example, what would tradi-
tionally be "ld a, b" would become "A B LDrr,".
Words in the Z80 assembler, loaded with "5 LOAD" allow you to
assemble z80 binaries. Being Forth words, opcode assembly is a
bit different than with a typical assembler. For example, what
would traditionally be "ld a, b" would become "A B LDrr,".

Those opcode words, of which there is a complete list below, end
with "," to indicate that their effect is to write (,) the cor-
@@ -138,3 +138,24 @@ RR RRC SRL RRA RRCA
CALL RST DJNZ
DI EI EXDEHL EXX HALT
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

+ 2
- 2
recipes/pcat/Makefile Ver arquivo

@@ -18,8 +18,8 @@ blkfs: $(BLKPACK)
$(STAGE):
$(MAKE) -C $(CDIR) stage

mbr.bin: mbr.fs $(STAGE)
cat mbr.fs | $(STAGE) > $@
mbr.bin: mbr.fs $(STAGE) blkfs
cat mbr.fs | $(STAGE) blkfs > $@

$(TARGET): mbr.bin os.bin
cat mbr.bin os.bin > $@


+ 1
- 1
recipes/pcat/blk/612 Ver arquivo

@@ -1,7 +1,7 @@
0xff00 CONSTANT RS_ADDR
0xfffa CONSTANT PS_ADDR
RS_ADDR 0x80 - CONSTANT SYSVARS
750 LOAD ( 8086 asm )
30 LOAD ( 8086 asm )
262 LOAD ( xcomp ) 270 LOAD ( xcomp overrides )
805 820 LOADR ( 8086 boot code )
353 LOAD ( xcomp core low )


+ 2
- 2
recipes/pcat/mbr.fs Ver arquivo

@@ -1,4 +1,4 @@
750 LOAD
832 LOAD
30 LOAD
602 LOAD
ORG @ 256 /MOD 2 PC! 2 PC!
H@ 256 /MOD 2 PC! 2 PC!

Carregando…
Cancelar
Salvar