| |||
Views: 88,275,699 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 03-19-24 09:06 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 4 guests |
Main - ROM Hacking - Binary math question in 6502 ASM (nevermind, I figured it out) | New thread | Thread closed |
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 815/994 EXP: 2430516 Next: 31335 Since: 09-30-07 Last post: 1897 days Last view: 919 days |
I need to take a bank number, in hex, such as 06 or 07, and a 1 to bit 7, and then store it.
How do I do that in 6502? lda bank_number ; lets just say it is #$06 (I need to make bit 7 of #$06 a 1) So, if #$06 in binary is 00000110, I need to have it as 10000110, and then store it into an address. STA bank_switch_address I just don't know how to do that in 6502 opcodes. Any help would be greatly appreciated. Thanks! EDIT - Nevermind, I figured it out. I just converted the original number to binary, and the new binary number to hex, and saw the difference. The difference is 80. So all I have to do is add 80. Thanks for reading though! You may close this thread if you wish. ____________________ My YouTube Channel |
ninjablooper |
| ||
Bullet Bill Level: 49 Posts: 476/509 EXP: 832573 Next: 51310 Since: 10-27-09 From: Earth Last post: 2961 days Last view: 2935 days |
Okay, if you want me too I'll close it then. If the problem is more complex than you thought or something just PM me and I'll reopen it. ____________________ -Ninjablooper |
Main - ROM Hacking - Binary math question in 6502 ASM (nevermind, I figured it out) | New thread | Thread closed |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 42, rows: 63/64, time: 0.015 seconds. |