1
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?

More than 5 years have passed since last update.

[PC-6001] 2msタイマー

Last updated at Posted at 2013-04-25

大体2ms間隔で割り込みが掛かります。

##登録

        di
        ;保存して
        ld      hl,($FA06)
        ld      (work),hl
        ;登録
        ld      hl,handler
        ld      ($FA06),hl
        ei

        ;元に戻す
        di
        ld      hl,(work)
        ld      ($FA06),hl
        ei

##ハンドラ
カウントアップするだけ

handler:
        push    hl
        ld      hl,(counter)
        inc     hl
        ld      (counter),hl
        pop     hl
        ei
        ret
1
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
1
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?