The following are added instructions:
ADD SP,nn ;nn = signed byte
LDI (HL),A ;Write A to (HL) and increment HL
LDD (HL),A ;Write A to (HL) and decrement HL
LDI A,(HL) ;Write (HL) to A and increment HL
LDD A,(HL) ;Write (HL) to A and decrement HL
LD A,($FF00+nn)
LD A,($FF00+C)
LD ($FF00+nn),A
LD ($FF00+C),A
LD (nnnn),SP
LD HL,SP+nn ;nn = signed byte
STOP ;Stop processor & screen until
button press
SWAP r ;Swap high & low nibbles of r
The following instructions have been removed:
Any command that uses the IX or IY registers.
All IN/OUT instructions.
All exchange instructions.
All commands prefixed by ED (except remapped RETI).
All conditional jumps/calls/rets on parity/overflow
and sign flag.
The following instructions have different opcodes:
LD A,[nnnn]
LD [nnnn],A
RETI
EX DE,HL や EX HL,(SP) は8080からあるが、それも削ったみたい。 ゲームボーイ専用ではないかと。ポケコン以下なので流用先もなさそう。
Uniquely, the size of the displacement is encoded in its most significant bits: 0, 10 and 11 preceded 7-, 14- and 30-bit signed displacements. (Although the processors are otherwise consistently little-endian, displacements in the instruction stream are stored in big-endian order).
ゲームボーイはZ80だったのか… (スコア:1)
6502だと勝手に思いこんでたよ。
ファミコンからの移植大変だったんじゃないのかなあ
Re: (スコア:0)
Z80というより8080に近かったようですが
液晶と抱合せでシャープのIP使ったのでしょうね
Re:ゲームボーイはZ80だったのか… (スコア:2, 参考になる)
Z80比
http://marc.rawer.de/Gameboy/Docs/GBCPUman.pdf [rawer.de]
The following are added instructions:
ADD SP,nn ;nn = signed byte
LDI (HL),A ;Write A to (HL) and increment HL
LDD (HL),A ;Write A to (HL) and decrement HL
LDI A,(HL) ;Write (HL) to A and increment HL
LDD A,(HL) ;Write (HL) to A and decrement HL
LD A,($FF00+nn)
LD A,($FF00+C)
LD ($FF00+nn),A
LD ($FF00+C),A
LD (nnnn),SP
LD HL,SP+nn ;nn = signed byte
STOP ;Stop processor & screen until
button press
SWAP r ;Swap high & low nibbles of r
The following instructions have been removed:
Any command that uses the IX or IY registers.
All IN/OUT instructions.
All exchange instructions.
All commands prefixed by ED (except remapped RETI).
All conditional jumps/calls/rets on parity/overflow
and sign flag.
The following instructions have different opcodes:
LD A,[nnnn]
LD [nnnn],A
RETI
EX DE,HL や EX HL,(SP) は8080からあるが、それも削ったみたい。
ゲームボーイ専用ではないかと。ポケコン以下なので流用先もなさそう。
Re: (スコア:0)
スラドで「IP」と言ったらどの用法が多いのだろう?
インターネット・プロトコル?
集積回路?
知的財産権?
ITパスポート試験?
防沫等級?
Re: (スコア:0)
Instruction Pointer
IronPython
昔あった雑誌
Re: (スコア:0)
話題ごとに等しく多いでしょう。
偏りがみられるなら観測者に依るかと。
Re: (スコア:0)
集積回路はICじゃないの?
Re: (スコア:0)
ファミコンからの移植大変だったんじゃないのかなあ
完全移植というわけではないし、ハードウェアがさっぱり違うので
CPUが同じだったとしても省ける工数は多くはないんじゃないかなと。
Re: (スコア:0)
6502がリトルエンディアンだというのを今知った。
ビッグエンディアンだったら移植がもっと大変だっただろう。
ちなみに自分がマシン語を使ったのは6809が最初で次に68000だったけど
リトルエンディアンのことを知ったときは正気の沙汰ではないと感じた。
もうエンディアンの違いは意識することもない人生を送っているけれど、
なぜリトルエンディアンが主流になったのだろう?
ハード的にはそちらのほうが有利な点があったとか?
Re: (スコア:0)
たとえば2バイト長の加算は
リトルエンディアン:下位バイトフェッチ、下位加算、ポインタインクリメント、上位バイトフェッチ、上位加算、ポインタインクリメント
ビッグエンディアン:上位バイトフェッチ、バッファ、ポインタインクリメント、下位バイトフェッチ、下位加算、上位加算、ポインタインクリメント
となる。
ビッグエンディアンは見た目はわかりやすいが回路的にはオーバーヘッドにしかならない。たとえば IBM System 360はビッグエンディアン、DEC VAXはリトルエンディアン、PDP-11は非常に特殊なエンディアン。
https://ja.wikipedia.org/wiki/PDP-11 [wikipedia.org]
PDP-11のエンディアンは独特であった。16ビットワードはリトルエンディアンで格納される。すなわち下位バイトがアドレスの小さいほうに格納される。32ビットワードを構成する2個の16ビットワードは、ビッグエンディアンで格納
Re: (スコア:0)
32032は「命令はビッグエンディアン、データはリトルエンディアン」という変なやつ。
https://en.wikipedia.org/wiki/NS32000 [wikipedia.org]
Uniquely, the size of the displacement is encoded in its most significant bits: 0, 10 and 11 preceded 7-, 14- and 30-bit signed displacements. (Although the processors are otherwise consistently little-endian, displacements in the instruction stream are stored in big-endian order).
Re: (スコア:0)
ビッグエンディアンがオーバーヘッドになるのは加算機が8ビットだからって事だろうか
Re: (スコア:0)
エンディアン嘘つかない
うじゃうじゃ