Experimenting with lcd cursor location instructions
This commit is contained in:
33
README.md
33
README.md
@@ -4,15 +4,38 @@ Compilatore c: sdcc (da repo debian)
|
||||
Eeprom flash: minipro (da https://gitlab.com/DavidGriffith/minipro/)
|
||||
|
||||
# Assembly
|
||||
## Compilare assembly:
|
||||
## Deploy
|
||||
### Compilare assembly:
|
||||
`z80asm -i hd44780_lcd_test_procedure.asm -o rom.bin`
|
||||
## Portare binario alla dimensione dell eeprom:
|
||||
### Portare binario alla dimensione dell eeprom:
|
||||
`dd if=/dev/zero of=rom.bin bs=1 count=0 seek=8192`
|
||||
## Scrivere su EEPROM:
|
||||
### Scrivere su EEPROM:
|
||||
`minipro -w rom.bin -p "AT28C64B"`
|
||||
## Leggere EEPROM:
|
||||
### Leggere EEPROM:
|
||||
`minipro -r rom_read.bin -p "AT28C64B"`
|
||||
## Istruzioni
|
||||
### Dichiarare una variabile:
|
||||
Usare EQU per assegnare una posizione di memoria nota (nella RAM) al nome variabile.
|
||||
```
|
||||
myVar: EQU 0x800F ; init variable
|
||||
ld hl, "A" ; load value into register
|
||||
ld (myVar), hl ; copy value into variable
|
||||
```
|
||||
NB: Se il programma si blocca, verificare che la variabile non sia stata dichiarata in una parte non scrivibile della memoria (ROM)
|
||||
### Accedere ad una variabile
|
||||
Modificarne il valore (nell'esempio: incrementarla di 1)
|
||||
```
|
||||
ld a, (myVar)
|
||||
inc a
|
||||
ld (myVar), a
|
||||
```
|
||||
Passarne il puntatore ad una funzione:
|
||||
```
|
||||
ld bc, myVar
|
||||
call lcd_print
|
||||
```
|
||||
|
||||
# C
|
||||
## Compilare c:
|
||||
## Deploy
|
||||
### Compilare c:
|
||||
`sdcc -mz80 test.c`
|
||||
|
Reference in New Issue
Block a user