URL
https://opencores.org/ocsvn/diogenes/diogenes/trunk
Subversion Repositories diogenes
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 218 to Rev 219
- ↔ Reverse comparison
Rev 218 → Rev 219
/trunk/diogenes/examples/lcd_demo.asm
0,0 → 1,117
begin: |
@ set all 0 |
ldi l0, 0 |
ldi l3, 0xc0 @ RS |
stio l0, [l3] |
nop |
ldi l3, 0xd0 @ RW |
stio l0, [l3] |
nop |
ldi l3, 0xe0 @ E |
stio l0, [l3] |
nop |
ldi l3, 0xf0 @ DATA |
stio l0, [l3] |
nop |
|
LDL h3, :wr_cmd |
call h4, <h3> |
ldi l0, 0x33 @ enable 4Bit Mode |
|
LDL h6, :wr_data |
call h7, <h6> |
ldi l0, 0x02 |
|
LDL h3, :wr_cmd |
call h4, <h3> |
ldi l0, 0x28 @ 2line |
call h4, <h3> |
ldi l0, 0x0c @ disp on |
call h4, <h3> |
ldi l0, 0x01 @ clear |
|
ldi l0, 1 @ set RS = 1 |
ldi l1, 0xc0 |
stio l0, [l1] |
|
call h4, <h3> |
ldi l0, 32 |
call h4, <h3> |
ldi l0, 32 |
call h4, <h3> |
ldi l0, 65 |
call h4, <h3> |
ldi l0, 78 |
call h4, <h3> |
ldi l0, 68 |
call h4, <h3> |
ldi l0, 73 |
call h4, <h3> |
ldi l0, 32 |
call h4, <h3> |
ldi l0, 38 |
call h4, <h3> |
ldi l0, 32 |
call h4, <h3> |
ldi l0, 68 |
call h4, <h3> |
ldi l0, 65 |
call h4, <h3> |
ldi l0, 86 |
call h4, <h3> |
ldi l0, 73 |
call h4, <h3> |
ldi l0, 68 |
|
brnz h4, :end |
nop |
|
wait_ms: |
shi l1, 7 |
wait_us: |
shi l1, 6 |
lo0: |
brnz l1, :lo0 |
adi l1, -1 |
jump <h5> |
nop |
|
wr_cmd: |
or l4, l0, l0 |
LDL h6, :wr_data |
shi l0, -4 |
call h7, <h6> |
nop |
ldi l0, 0x0f |
and l0, l0, l4 |
call h7, <h6> |
nop |
jump <h4> |
nop |
|
wr_data: |
LDL h5, :wait_ms |
call h5, <h5> |
ldi l1, 150 |
|
ldi l1, 0xf0 @ DATA |
stio l0, [l1] |
ldi l1, 0xe0 @ E |
ldi l0, 0x1 |
stio l0, [l1] |
|
LDL h5, :wait_us |
call h5, <h5> |
ldi l1, 250 |
|
ldi l1, 0xe0 @ E |
ldi l0, 0x0 |
stio l0, [l1] |
jump <h7> |
nop |
|
end: |
stop |
|
|
|
trunk/diogenes/examples/lcd_demo.asm
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/diogenes/examples/input.bin
===================================================================
--- trunk/diogenes/examples/input.bin (nonexistent)
+++ trunk/diogenes/examples/input.bin (revision 219)
@@ -0,0 +1 @@
+ `ðh` išø à›ø à™Ï àÿÿ
\ No newline at end of file
trunk/diogenes/examples/input.bin
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/diogenes/examples/revert.asm
===================================================================
--- trunk/diogenes/examples/revert.asm (nonexistent)
+++ trunk/diogenes/examples/revert.asm (revision 219)
@@ -0,0 +1,51 @@
+ ldi h0, 0x02
+ ldi h1, 0x01
+ ldi l1, 0x81
+ ldi l0, 0x80
+ ldi l2, 0x00
+ ldi h4, 0x00 @ memory address
+1:
+ ldio l3, [l0]
+ nop
+ and l4, l3, h0
+ brz l4, :1
+ nop
+ ldio l3, [l1] @ uart rcv
+ nop
+ nop
+ st l3, [h4]
+ ldi h2, 13
+ sub h2, h2, l3
+ brz h2, :print_back
+ nop
+ adi h4, 1
+ stio l3, [l1] @ uart echo
+ nop
+ nop
+ brnz h2, :1
+ nop
+
+print_back:
+ brz h4, :2
+ nop
+ adi h4, -1
+2:
+ ldio l3, [l0]
+ nop
+ and l4, l3, h1
+ brz l4, :2
+ nop
+ ld l3, [h4]
+ nop
+ stio l3, [l1] @ uart send
+ nop
+ nop
+ brnz h4, :print_back
+ nop
+3:
+ brz h2, :1
+ nop
+ stop
+
+
+
trunk/diogenes/examples/revert.asm
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/diogenes/examples/lcd.bin
===================================================================
--- trunk/diogenes/examples/lcd.bin (nonexistent)
+++ trunk/diogenes/examples/lcd.bin (revision 219)
@@ -0,0 +1 @@
+ `ðh` i›ø à?àa q qÐ?ápßAè` i›ø à?àa q qÐ?ápßèpÎ àÿÿ
\ No newline at end of file
Index: trunk/diogenes/old/build.sh
===================================================================
--- trunk/diogenes/old/build.sh (nonexistent)
+++ trunk/diogenes/old/build.sh (revision 219)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+
+../asm/asm $1.asm > $1.bin
+cat $1.bin | ../sim/sendb
trunk/diogenes/old/build.sh
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/diogenes/old/lcd.bin
===================================================================
--- trunk/diogenes/old/lcd.bin (nonexistent)
+++ trunk/diogenes/old/lcd.bin (revision 219)
@@ -0,0 +1 @@
+ `ðh` i›ø à?àa q qÐ?ápßAè` i›ø à?àa q qÐ?ápßèpÎ àÿÿ
\ No newline at end of file