mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-18 13:30:24 +00:00
Add Robotron Z1013 support
This commit is contained in:
parent
889a4f94be
commit
d45fe42d17
1
.gitignore
vendored
1
.gitignore
vendored
@ -51,6 +51,7 @@ issue*.mfk
|
|||||||
*.ssd
|
*.ssd
|
||||||
*.o
|
*.o
|
||||||
*.cmd
|
*.cmd
|
||||||
|
*.z80
|
||||||
HELLO
|
HELLO
|
||||||
HELLOCPC
|
HELLOCPC
|
||||||
FIZZBUZZ
|
FIZZBUZZ
|
||||||
|
@ -99,6 +99,8 @@ The compiler emits COM files.
|
|||||||
|
|
||||||
* `cpm_z80` – CP/M on Z80
|
* `cpm_z80` – CP/M on Z80
|
||||||
|
|
||||||
|
* `z1013` – Robotron Z1013. The compiler emits Z80 files.
|
||||||
|
|
||||||
* `trs80m1cmd` – TRS-80 Model 1 running TRS-DOS. The compiler emits CMD files.
|
* `trs80m1cmd` – TRS-80 Model 1 running TRS-DOS. The compiler emits CMD files.
|
||||||
|
|
||||||
* `trs80m3cmd` – TRS-80 Model 3 running TRS-DOS. The compiler emits CMD files.
|
* `trs80m3cmd` – TRS-80 Model 3 running TRS-DOS. The compiler emits CMD files.
|
||||||
|
@ -124,6 +124,8 @@ English, Japanese, Spanish/Italian and French/German respectively
|
|||||||
|
|
||||||
* `cocoscr` – Tandy Color Computer screencodes
|
* `cocoscr` – Tandy Color Computer screencodes
|
||||||
|
|
||||||
|
* `z1013` – text encodind used on Robotron Z1013
|
||||||
|
|
||||||
* `ebcdic` – EBCDIC codepage 037 (partial coverage)
|
* `ebcdic` – EBCDIC codepage 037 (partial coverage)
|
||||||
|
|
||||||
* `utf8` – UTF-8
|
* `utf8` – UTF-8
|
||||||
@ -214,6 +216,7 @@ Encoding | lowercase letters | backslash | currencies | intl | card suits
|
|||||||
`apple2` | no | yes | | none | no
|
`apple2` | no | yes | | none | no
|
||||||
`atascii` | yes | yes | | none | yes
|
`atascii` | yes | yes | | none | yes
|
||||||
`atasciiscr` | yes | yes | | none | yes
|
`atasciiscr` | yes | yes | | none | yes
|
||||||
|
`z1013` | yes | yes | | none | yes
|
||||||
`jis` | yes | no | ¥ | both kana | no
|
`jis` | yes | no | ¥ | both kana | no
|
||||||
`dmcs`,`lics` | yes | yes | ¢£¥ | Western | no
|
`dmcs`,`lics` | yes | yes | ¢£¥ | Western | no
|
||||||
`brascii`,`macroman`| yes | yes | ¢£¥ | Western | no
|
`brascii`,`macroman`| yes | yes | ¢£¥ | Western | no
|
||||||
|
21
include/encoding/z1013.tbl
Normal file
21
include/encoding/z1013.tbl
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
NAME=Z1013
|
||||||
|
EOT=00
|
||||||
|
|
||||||
|
20=U+0020
|
||||||
|
21-3f=!"#$%&'()*+,-./0123456789:;<=>?
|
||||||
|
40-5f=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
|
||||||
|
60-7e=`abcdefghijklmnopqrstuvwxyz{|}~
|
||||||
|
|
||||||
|
{b}=08
|
||||||
|
{t}=09
|
||||||
|
{n}=0d0a
|
||||||
|
{q}=22
|
||||||
|
{apos}=27
|
||||||
|
{lbrace}=7b
|
||||||
|
{rbrace}=7d
|
||||||
|
|
||||||
|
♥=CB
|
||||||
|
♡=CB
|
||||||
|
♠=CC
|
||||||
|
♣=CA
|
||||||
|
♢=C9
|
@ -154,6 +154,11 @@ import trs80/keyboard
|
|||||||
#define OK = 1
|
#define OK = 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if Z1013
|
||||||
|
import z1013/keyboard
|
||||||
|
#define OK = 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if not(OK)
|
#if not(OK)
|
||||||
#if KEYBOARD
|
#if KEYBOARD
|
||||||
#warn keyboard module is not yet supported
|
#warn keyboard module is not yet supported
|
||||||
|
27
include/platform/z1013.ini
Normal file
27
include/platform/z1013.ini
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
;Robotron Z1013 with 64K of RAM
|
||||||
|
[compilation]
|
||||||
|
arch=z80
|
||||||
|
encoding=z1013
|
||||||
|
modules=default_panic,z1013/kernal,stdlib
|
||||||
|
|
||||||
|
[allocation]
|
||||||
|
segments=default
|
||||||
|
segment_default_start=$0100
|
||||||
|
segment_default_datastart=after_code
|
||||||
|
segment_default_end=$ebff
|
||||||
|
segment_default_layout=__init,main,*
|
||||||
|
|
||||||
|
[define]
|
||||||
|
Z1013=1
|
||||||
|
WIDESCREEN=0
|
||||||
|
KEYBOARD=1
|
||||||
|
; TODO: ?
|
||||||
|
JOYSTICKS=1
|
||||||
|
HAS_BITMAP_MODE=0
|
||||||
|
|
||||||
|
[output]
|
||||||
|
style=single
|
||||||
|
format=startaddr,endaddr,startaddr,"DDRDDR",$43,$d3,$d3,$d3,programname-16,allocated
|
||||||
|
extension=z80
|
||||||
|
|
||||||
|
|
45
include/z1013/kernal.mfk
Normal file
45
include/z1013/kernal.mfk
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#pragma zilog_syntax
|
||||||
|
|
||||||
|
import default_readword
|
||||||
|
|
||||||
|
array __readline_out[33]
|
||||||
|
const pointer readline_out = __readline_out.addr
|
||||||
|
|
||||||
|
asm pointer readline() {
|
||||||
|
rst $20
|
||||||
|
[$10]
|
||||||
|
ld hl, ($16)
|
||||||
|
ld de, readline_out
|
||||||
|
ld bc, $20
|
||||||
|
ldir
|
||||||
|
ld b, $20
|
||||||
|
ld hl, readline_out+31
|
||||||
|
ld a, 32
|
||||||
|
.loop:
|
||||||
|
cp (hl)
|
||||||
|
jr nz, .found
|
||||||
|
dec hl
|
||||||
|
djnz .loop
|
||||||
|
.found:
|
||||||
|
inc hl
|
||||||
|
ld (hl), nullchar
|
||||||
|
ld hl, readline_out
|
||||||
|
ret
|
||||||
|
}
|
||||||
|
|
||||||
|
inline asm void putchar(byte register(a) char) {
|
||||||
|
rst $20
|
||||||
|
[0]
|
||||||
|
? ret
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void new_line() {
|
||||||
|
putchar(13)
|
||||||
|
}
|
||||||
|
|
||||||
|
asm void __init() {
|
||||||
|
// printing $0c clears the screen
|
||||||
|
ld a,$c
|
||||||
|
rst $20
|
||||||
|
[0]
|
||||||
|
}
|
7
include/z1013/keyboard.mfk
Normal file
7
include/z1013/keyboard.mfk
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
inline asm byte readkey() {
|
||||||
|
rst $20
|
||||||
|
[1]
|
||||||
|
? ret
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user