The only way to start the CPU again is to turn off the GB and turn it back on, OR if using STOP on a GBC, it can be used to toggle the CPU speed (more in another lesson).ĭisable Interrupts. It's generally pretty smart to place two NOP's after a HALT due to a hardware bug. During HALT, the CPU power consumption is reduced. HALT's the CPU until an interrupt occurrs. ![]() ![]() No Operation - CPU does nothing for 1 instruction cycle. ![]() Set Carry Flag - Simply sets the carry flag (CY=1). So $F0 becomes $0F, etc.Ĭomplement Carry Flag - Simply inverts the carry flag in register F. This instruction swaps the high and low nybble's of A. Which, I believe is just inverting all of the bits. It basically takes A and applies a one's complement. This instruction is used about as often as you'll win the lottery, so I wont detail it.ĬPL is ComPLement A. It converts the value in A into a packed BCD (binary coded decimal) number. This is the Decimal Adjust Accumulator instruction. ![]() There are a few instructions that don't fall under any of the other categories, mostly for the reason that they accomplish certain special tasks on the system. In this lesson, you will learn a bit about some more arithmetic instructions and some CPU controlling instructions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |