I saw a video showing that typing 211808F874364436206C3601C9 into the Ti 84 CE would enable dark mode. I tried using a dissembler to try and see what the assembly code did so I could implement it in C, but I couldn't get it to work. What would the equivalent of this assembly be in C, and would it be possible for darkmode to work in 8 bit color mode?

Using eZDisasm:

Code:
211808F8      ld        hl, F80818
74            ld        (hl), h
3644          ld        (hl), 44
3620          ld        (hl), 20
6C            ld        l, h
3601          ld        (hl), 01
C9            ret

Here is how I interpreted the Assembly:

Code:
hl = F80818
put h at address F80818
put 44 at address F80818
put 20 at address F80818
put h in l
put 01 in at address F80818
return

I do know that this code sets the display to 8 bit mode, 0x92D resets it to 16bit mode, 0x827 swaps red and blue, 0xB27 swaps the byte order, 0xA27 swaps red and blue along with byte order.

Code:
volatile int *p = (int*)0xE30018;
*p = 0x927; //8bit mode 1001 0010 0101

Code:
#include <stdint.h>

int main(void)
{
    ((void(*)(void))0x384)();

    *(volatile uint8_t*)0xF80018 = 0x08;
    *(volatile uint8_t*)0xF80018 = 0x44;
    *(volatile uint8_t*)0xF80018 = 0x21;
    *(volatile uint8_t*)0xF80008 = 0x01;

    return 0;
}


0x20 instead of 0x21 to uninvert. You can also just do inline or external assembly.
Cool thanks. Its pretty neat seeing it run, especially since I could not type the assembly code directly into my calculator since it is running 5.4.

I did notice that when run, it would reset the LCD mode to 0x92D and would cause a white flash.

Code:
#include <stdint.h>

int main(void)
{
    ((void(*)(void))0x384)();

    *(volatile uint8_t*)0xF80018 = 0x08;
    *(volatile uint8_t*)0xF80018 = 0x44;
    *(volatile uint8_t*)0xF80018 = 0x21;
    *(volatile uint8_t*)0xF80008 = 0x01;

    return 0;
}


Is there a way to make this code for dark mode not reset when you turn the calculator off and then on?
As LogicalJoe mentioned in SAX, no.

Unless you made an assembly hook that runs when the calculator turns on.
ZERICO2005 wrote:
Cool thanks. Its pretty neat seeing it run, especially since I could not type the assembly code directly into my calculator since it is running 5.4.


I just use ICE's Asm() command to input hex, or create a blank asm program and put hex in it using Hexaedit.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement