Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module common.rp6502.alu;
- class ALU
- {
- public ubyte c;
- public ubyte v;
- public ubyte shl(ubyte value, int carry = 0)
- {
- asm
- {
- ror carry, 1;
- rcl value, 1;
- mov ECX, this;
- setc c[ECX];
- }
- return value;
- }
- public ubyte shr(ubyte value, int carry = 0)
- {
- asm
- {
- ror carry, 1;
- rcr carry, 1;
- mov ECX, this;
- setc c[ECX];
- }
- return value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement