I/O
| ポート番号 | 内容 |
|---|---|
| $A0 | レジスタ指定ポート |
| $A1 | 出力データ |
| $A2 | 入力データ |
read/write
BIOS使わない
; read
ld a,register ; レジスタ番号
out ($A0),a
in a,($A2)
; write
ld a,register ; レジスタ番号
out ($A0),a
ld a,data
out ($A1),a
BIOS使う
; write
ld a,register
ld e,data
call $1BC5
; read & write
ld a,register
ld e,data
call $1BBE
; Dreg = 書き込み前のデータ
- readは無い
レジスタ
| register | PC-6001 | AY-3-8910 | Operation |
|---|---|---|---|
| $00 - \$05 | R0 - R5 | R0 - R5 | Tone Generator Control |
| $06 | R6 | R6 | Noise Generator Control |
| $07 | R7 | R7 | Mixer Control-I/O Enable |
| $08 - \$0A | R8 - R10 | R10 - R12 | Amplitude Control |
| $0B - \$0C | R11 - R12 | R13 - R14 | Envelop Period Control |
| $0D | R13 | R15 | Envelop Shape/Cycle Control |
- PC-6001は10進表記
- AY-3-8910は8進表記
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
