fix bootloader and add docs, minor fix to hello
This commit is contained in:
@@ -4,6 +4,41 @@
|
||||
//
|
||||
// Put your code here:
|
||||
|
||||
|
||||
// @R0
|
||||
// D=M
|
||||
//
|
||||
// // Shift left by 8 bits by doubling 8 times
|
||||
// D=D+D // Shift left by 1 bit
|
||||
// D=D+D // Shift left by another bit
|
||||
// D=D+D // Shift left by another bit
|
||||
// D=D+D // Shift left by another bit (4-bit shift so far)
|
||||
// D=D+D // Shift left by another bit
|
||||
// D=D+D // Shift left by another bit
|
||||
// D=D+D // Shift left by another bit
|
||||
// D=D+D // Shift left by another bit (now D contains 0xEA00)
|
||||
//
|
||||
// D=M -> 1111110000010000
|
||||
// M=D -> 1110001100001000
|
||||
// M=0 -> 1110101010001000
|
||||
//
|
||||
// // Store the result in R1
|
||||
// @R1
|
||||
// M=D
|
||||
//
|
||||
//
|
||||
// 00010000 0 -> add 8 times and store to lhs
|
||||
// 00000001 1 -> add to lhs and store to word
|
||||
// 0001000000000001 write all the words to sram
|
||||
//
|
||||
// 0001000000000001
|
||||
// 1111110001010000
|
||||
// 0001000000000000
|
||||
// 1110001100001000
|
||||
// 0000000000000000
|
||||
// 1110101010000111
|
||||
|
||||
|
||||
// read data starting at address
|
||||
// 0x03 0x01 0x00 0x00
|
||||
@3
|
||||
@@ -48,7 +83,7 @@
|
||||
@DECR2
|
||||
D;JGT
|
||||
|
||||
//command stack base address
|
||||
//command stack base address
|
||||
@100
|
||||
D=A
|
||||
@READCOMMAND
|
||||
@@ -120,7 +155,7 @@
|
||||
(WESTWORD)
|
||||
@SPI
|
||||
D=M
|
||||
@R13
|
||||
@DEBUG0
|
||||
M=D
|
||||
DM=D+M
|
||||
DM=D+M
|
||||
@@ -142,11 +177,11 @@
|
||||
M=D
|
||||
@SPI
|
||||
D=M
|
||||
@R14
|
||||
@DEBUG1
|
||||
M=D
|
||||
@R13
|
||||
@DEBUG0
|
||||
D=M
|
||||
@R14
|
||||
@DEBUG1
|
||||
D=D+M
|
||||
@SRAM_D
|
||||
M=D
|
||||
@@ -154,7 +189,7 @@
|
||||
M=0
|
||||
@WORDCOUNT
|
||||
M=M+1
|
||||
@6
|
||||
@57343
|
||||
D=A
|
||||
@WORDCOUNT
|
||||
D=D-M
|
||||
|
Reference in New Issue
Block a user