diff --git a/blk/001 b/blk/001 index 7a7b3b9..feb2f30 100644 --- a/blk/001 +++ b/blk/001 @@ -3,11 +3,10 @@ MASTER INDEX 005 Z80 assembler 030 8086 assembler 050 AVR assembler 70-99 unused 100 Block editor 120 Visual Editor -160-259 unused 260 Cross compilation +160 AVR SPI programmer +170-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-689 unused -690 AVR SPI programmer -700-799 unused +550-799 unused 800 8086 boot code diff --git a/blk/691 b/blk/160 similarity index 91% rename from blk/691 rename to blk/160 index 851d921..20afd35 100644 --- a/blk/691 +++ b/blk/160 @@ -1,3 +1,4 @@ +( AVR Programmer, load range 160-162. doc/avr.txt ) ( page size in words, 64 is default on atmega328P ) CREATE aspfpgsz 64 , VARIABLE aspprevx diff --git a/blk/692 b/blk/161 similarity index 100% rename from blk/692 rename to blk/161 diff --git a/blk/693 b/blk/162 similarity index 100% rename from blk/693 rename to blk/162 diff --git a/blk/650 b/blk/650 deleted file mode 100644 index 0bde4f0..0000000 --- a/blk/650 +++ /dev/null @@ -1,5 +0,0 @@ -AVR assembler - -651 Guide 655 Instructions list -660 Loader 661-672 Code -672 Common AVR consts diff --git a/blk/651 b/blk/651 deleted file mode 100644 index b29b7fa..0000000 --- a/blk/651 +++ /dev/null @@ -1,16 +0,0 @@ -This assembler works very much like Z80 assembler (B200) so -refer to this documentation first. Here, we document specifici- -ties. - -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. - - (cont.) diff --git a/blk/652 b/blk/652 deleted file mode 100644 index 76f5678..0000000 --- a/blk/652 +++ /dev/null @@ -1,9 +0,0 @@ -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 ) diff --git a/blk/655 b/blk/655 deleted file mode 100644 index bf77661..0000000 --- a/blk/655 +++ /dev/null @@ -1,16 +0,0 @@ -AVR instructions list - -OPRd (B663) -ASR COM DEC INC LAC LAS LAT LSR NEG POP PUSH -ROR SWAP XCH - -OPRdRr (B664) -ADC ADD AND CP CPC CPSE EOR MOV MUL OR SBC -SUB - -OPRdA (B664) -IN OUT - -OPRdK (B665) -ANDI CPI LDI ORI SBCI SBR SUBI - (cont.) diff --git a/blk/656 b/blk/656 deleted file mode 100644 index db63709..0000000 --- a/blk/656 +++ /dev/null @@ -1,16 +0,0 @@ -OPAb (B665) -CBI SBI SBIC SBIS - -OPNA (B666) -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 (B667) -BCLR BSET - -OPRdb (B667) -BLD BST SBRC SBRS - -Special (B667,B670) -CLR TST LSL LD ST - (cont.) diff --git a/blk/657 b/blk/657 deleted file mode 100644 index 6d305be..0000000 --- a/blk/657 +++ /dev/null @@ -1,6 +0,0 @@ -Flow (B668) -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 (B671) -LBL! LBL, SKIP, TO, FLBL, FLBL! BEGIN, AGAIN? AGAIN, IF, THEN, diff --git a/blk/690 b/blk/690 deleted file mode 100644 index 27feaaa..0000000 --- a/blk/690 +++ /dev/null @@ -1,7 +0,0 @@ -AVR SPI programmer - -This program allows you to access AVR chips Flash memory, EEPROM -and fuses using a SPI relay. This requires drivers that imple- -ment the SPI Relay protocol. - -Load range: B691-B693 diff --git a/doc/avr.txt b/doc/avr.txt index a73108f..1717492 100644 --- a/doc/avr.txt +++ b/doc/avr.txt @@ -1,11 +1,9 @@ -# Working with AVR microcontrollers - -# Assembling AVR binaries - -TODO - # Programming AVR chips +(In this documentation, you are expected to have an AVR binary +ready to send. To assemble an AVR binary from source, see +asm.txt) + To program AVR chips, you need a device that provides the SPI protocol. The device built in the rc2014/sdcard recipe fits the bill. Make sure you can override the SPI clock because the sys- @@ -18,7 +16,7 @@ to proper AVR pins as described in the MCU's datasheet. Note that this device will be the same as the one you'll use for any modern SPI-based AVR programmer, with RESET replacing SS. -The AVR programming code is at B690. +The AVR programming code is at B160. Before you begin programming the chip, the device must be desel- ected. Ensure with "0 (spie)".