mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-26 02:49:17 +00:00
52 lines
3.3 KiB
Plaintext
52 lines
3.3 KiB
Plaintext
|
Screen 0 not modified
|
||
|
0 \ Z80-Portzugriff UH 05Nov86
|
||
|
1
|
||
|
2 Dieses File enthaelt Definitionen um die Z80-Ports ueber 16-Bit
|
||
|
3 Adressen anzusprechen.
|
||
|
4
|
||
|
5 Einige Komputer, so die der Schneider Serie dekodieren ihre
|
||
|
6 Ports etwas unkonventionell, sodass sie unbedingt ueber 16-Bit
|
||
|
7 Adressen angesprochen werden muessen.
|
||
|
8 Im allgemeinen sollte es ausreichen 8-Bit Adressen zu benutzen.
|
||
|
9
|
||
|
10
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|
||
|
Screen 1 not modified
|
||
|
0 \ Z80-Portaccess Extending 8080-Assembler UH 05Nov86
|
||
|
1
|
||
|
2 Assembler definitions
|
||
|
3
|
||
|
4 | : Z80-io ( base -- ) \ define special Z80-io instruction
|
||
|
5 Create c,
|
||
|
6 Does> ( reg -- ) $ED c, c@ swap 8 * + c, ;
|
||
|
7
|
||
|
8 $40 Z80-io (c)in
|
||
|
9 $41 Z80-io (c)out
|
||
|
10
|
||
|
11 Forth definitions
|
||
|
12
|
||
|
13 -->
|
||
|
14
|
||
|
15
|
||
|
Screen 2 not modified
|
||
|
0 \ store and fetch values with 16-bit port-adresses UH 05Nov86
|
||
|
1
|
||
|
2 Code pc@ ( 16b -- 8b ) \ fetch 8-bit value from 16-bit port-addr
|
||
|
3 H pop IP push H B mvx L (c)in 0 H mvi
|
||
|
4 IP pop hpush jmp
|
||
|
5 end-code
|
||
|
6
|
||
|
7 Code pc! ( 8b 16b -- ) \ store 8-bit value to 16-bit port-addr
|
||
|
8 H pop D pop IP push H B mvx E (c)out
|
||
|
9 IP pop Next
|
||
|
10 end-code
|
||
|
11
|
||
|
12
|
||
|
13
|
||
|
14
|
||
|
15
|