0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

z88dk MSX BIOSコール

Posted at

C言語でBIOSをコールする方法

main.c
#include <stdint.h>

// BIOSルーチンのアドレスを関数ポインタにキャスト
#define CHPUT  ((void(*)(uint8_t))0x00A2)
#define CHGET  ((uint8_t(*)(void))0x009F)
#define CLS    ((void(*)(void))0x00C3)

void main(void) {
    CLS();              // 画面クリア
    CHPUT('H');         // 'H'を表示
    CHPUT('i');         // 'i'を表示

    uint8_t c = CHGET(); // キー入力を待つ
    CHPUT(c);            // 入力した文字を表示
}

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?