Commit Graph

10 Commits

Author SHA1 Message Date
ff7e8a7fb9 emu: INC/DEC opcodes. width={byte,word} argtypes for disambig
Also made all LValues also RValues for brevity (so INC/DEC don't have
to bound their destination arguments by both, but this is not required
if it causes problems for some reason down the road).
2021-03-19 00:07:49 -07:00
c8d6a3312a emu: near/short JUMP instructions. Use u16+wrapping_add for all rels 2021-03-18 02:16:15 -07:00
73c537183e emu: Rename "Addr" to "FarPtr"
It was a little confusing with the "Address" trait. And FarPtr carries
with it a segment.
2021-03-18 00:38:06 -07:00
3b746b75ec emu: PUSH/POP opcodes, reimpl RET as just "POP IP"
This also promotes CALL/RET to actually using the bus for
addressing (because it goes through the generic PUSH/POP code), which
is probably more correct anyway.
2021-03-18 00:32:08 -07:00
dcf96ec5b3 emu: Operand trait over u8/u16, d8_as_d16 argtype 2021-03-17 21:50:02 -07:00
ae1f3da4b2 emu: UNTESTED string ops, CMP instruction
Likely to be a bugfest.
There's a flags macro for now but unclear how useful it will turn out
to be in practice. Flags in particular need testing.

Also disappointing that I couldn't make instructions generic across
u8/u16, especially for ordinary, non-string CMP. Need to look into
this more to see if it can be done with num-traits or some other
trickery.
2021-03-17 21:37:03 -07:00
04348a816e emu: Fake opcode ASSERT for testing 2021-03-12 22:19:45 -08:00
0c55ff9b36 emu: modrm displacement, LEA instruction 2021-03-12 08:01:28 -08:00
ac7b3b16a1 emu: factor out utils into own module 2021-03-12 02:27:00 -08:00
27bc36f9d2 emu: factor out operations and operands into own module 2021-03-11 22:55:51 -08:00