1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-10-30 06:24:09 +00:00
millfork/include/cpm_bdos.mfk

70 lines
809 B
Plaintext
Raw Normal View History

2018-07-30 23:02:55 +00:00
2018-08-03 11:23:37 +00:00
#pragma intel_syntax
2018-07-30 23:02:55 +00:00
inline asm void exit() {
2018-08-03 11:23:37 +00:00
? mvi c, 0
2018-07-30 23:02:55 +00:00
call 5
? ret
}
inline asm void putchar (byte e) {
2018-08-03 11:23:37 +00:00
? mvi c, 2
2018-12-17 16:18:29 +00:00
call 5
2018-07-30 23:02:55 +00:00
? ret
}
2018-12-17 16:18:29 +00:00
inline void new_line() {
putchar(13)
putchar(10)
}
2018-07-30 23:02:55 +00:00
inline asm byte getchar() {
2018-08-03 11:23:37 +00:00
? mvi c, 1
2018-07-30 23:02:55 +00:00
call 5
? ret
}
#if 0
inline asm void putstr_cpm(pointer de) {
2018-08-03 11:23:37 +00:00
? mvi c, 9
2018-07-30 23:02:55 +00:00
call 5
? ret
}
#endif
inline asm byte readychar() {
2018-08-03 11:23:37 +00:00
? mvi c, 11
2018-07-30 23:02:55 +00:00
call 5
? ret
}
inline asm word cpm_version() {
2018-08-03 11:23:37 +00:00
? mvi c, 12
2018-07-30 23:02:55 +00:00
call 5
? ret
}
inline asm void reset_disk_system() {
2018-08-03 11:23:37 +00:00
? mvi c, 13
2018-07-30 23:02:55 +00:00
call 5
? ret
}
inline asm byte current_disk() {
2018-08-03 11:23:37 +00:00
? mvi c,25
2018-07-30 23:02:55 +00:00
call 5
? ret
}
#if 0
inline asm word console_mode(word de) {
2018-08-03 11:23:37 +00:00
? mvi c, 109
2018-07-30 23:02:55 +00:00
call 5
? ret
}
inline word get_console_mode() {
return console_mode($ffff)
}
inline asm void set_console_mode(word de) {
console_mode(mode)
}
#endif