Skip to content

Instantly share code, notes, and snippets.

@yang-wei
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yang-wei/69c69a775e361fec6dbb to your computer and use it in GitHub Desktop.
Save yang-wei/69c69a775e361fec6dbb to your computer and use it in GitHub Desktop.
ORG 8000H ; プログラム開始番地
LD A, 0A000H ; 入力値をAレジスタに転送
ADD A,8000H ; Aレジスタの内容に80Hを加算
SRA A ; Aレジスタを算術右シフト演算
SLA A ; Aレジスタを算術左シフト演算
SCF ; キャリーの補数を1にする
ADC A,07H ; Aレジスタに07Hおよびキャリーフラグの値を加算
AND 00F0H ; Aレジスタを00F0Hとの AND論理積
SET 7,A ; Aレジスタのビット7を1にする
RES 1,A ; Aレジスタのビット1を0にする
RLC A ; Aレジスタの内容を1ビット算術左シフト演算を行う
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment