🕌

8080でhello world

に公開

8080(僕、Z80の従兄弟)でhello world

        org 0x100        ; .COM は 0x100 にロードされる
start:
        mvi c,9          ; BDOS function 9 = print $-terminated string
        lxi d,msg        ; DE = アドレス of msg
        call 0x0005      ; BDOS entry at 0005h
        ret              ; CP/M に戻る

msg:    db 'Hello, world$'

もちろん、8080のISAは、axxでアセンブルできます。

Discussion