ソースを参照

Move AVR assembler from B650 to B50

And move its doc to doc/asm.txt
master
Virgil Dupras 3年前
コミット
faf088b397
15個のファイルの変更68行の追加3行の削除
  1. +3
    -3
      blk/001
  2. +0
    -0
      blk/050
  3. +0
    -0
      blk/051
  4. +0
    -0
      blk/052
  5. +0
    -0
      blk/053
  6. +0
    -0
      blk/054
  7. +0
    -0
      blk/055
  8. +0
    -0
      blk/056
  9. +0
    -0
      blk/057
  10. +0
    -0
      blk/058
  11. +0
    -0
      blk/059
  12. +0
    -0
      blk/060
  13. +0
    -0
      blk/061
  14. +0
    -0
      blk/062
  15. +65
    -0
      doc/asm.txt

+ 3
- 3
blk/001 ファイルの表示

@@ -1,13 +1,13 @@
MASTER INDEX

005 Z80 assembler 030 8086 assembler
50-99 unused
050 AVR assembler 70-99 unused
100 Block editor 120 Visual Editor
160-259 unused 260 Cross compilation
280 Z80 boot code 350 Core words
410 PS/2 keyboard subsystem 420 SD Card subsystem
440-519 unused 520 Fonts
550-649 unused
650 AVR assembler 690 AVR SPI programmer
550-689 unused
690 AVR SPI programmer
700-799 unused
800 8086 boot code

blk/660 → blk/050 ファイルの表示


blk/661 → blk/051 ファイルの表示


blk/662 → blk/052 ファイルの表示


blk/663 → blk/053 ファイルの表示


blk/664 → blk/054 ファイルの表示


blk/665 → blk/055 ファイルの表示


blk/666 → blk/056 ファイルの表示


blk/667 → blk/057 ファイルの表示


blk/668 → blk/058 ファイルの表示


blk/669 → blk/059 ファイルの表示


blk/670 → blk/060 ファイルの表示


blk/671 → blk/061 ファイルの表示


blk/672 → blk/062 ファイルの表示


+ 65
- 0
doc/asm.txt ファイルの表示

@@ -159,3 +159,68 @@ For jumps, it's special. 's' is SHORT, 'n' is NEAR, 'f' is FAR.
# 8086 Instructions list

TODO

# AVR assembler

Load with "50 LOAD". As with the Z80 assembler, it is incom-
plete.

All mnemonics in AVR have a single signature. Therefore, we
don't need any "argtype" suffixes.

Registers are referred to with consts R0-R31. There is
X, Y, Z, X+, Y+, Z+, X-, Y-, Z- for appropriate ops (LD, ST).
XL, XH, YL, YH, ZL, ZH are simple aliases to R26-R31.

Branching works differently. Instead of expecting a byte to be
written after the naked op, branching words expect a displace-
ment argument.

This is because there's bitwise ORing involved in the creation
of the final opcode, which makes z80a's approach impractical.

This makes labelling a bit different too. Instead of expecting
label words after the naked branching op, we rather have label
words expecting branching wordref as an argument. Examples:

L2 ' BRTS FLBL! ( branch forward to L2 )
L1 ' RJMP LBL, ( branch backward to L1 )

# AVR instructions list

OPRd (B53)
ASR COM DEC INC LAC LAS LAT LSR NEG POP PUSH
ROR SWAP XCH

OPRdRr (B54)
ADC ADD AND CP CPC CPSE EOR MOV MUL OR SBC
SUB

OPRdA (B54)
IN OUT

OPRdK (B55)
ANDI CPI LDI ORI SBCI SBR SUBI

OPAb (B55)
CBI SBI SBIC SBIS

OPNA (B56)
BREAK CL[C,H,I,N,S,T,V,Z] SE[C,H,I,N,S,T,V,Z] EIJMP ICALL
EICALL IJMP NOP RET RETI SLEEP WDR

OPb (B57)
BCLR BSET

OPRdb (B57)
BLD BST SBRC SBRS

Special (B57,B60)
CLR TST LSL LD ST

Flow (B58)
RJMP RCALL
BR[BC,BS,CC,CS,EQ,NE,GE,HC,HS,ID,IE,LO,LT,MI,PL,SH,TC,TS,VC,VS]

Flow macros (B61)
LBL! LBL, SKIP, TO, FLBL, FLBL! BEGIN, AGAIN? AGAIN, IF, THEN,

読み込み中…
キャンセル
保存