mnemonic pointers
mnemonic pointers
In the higher half kernel wiki page, they show some mnemonic pointers, such as 0xcafebabe, 0xdeadbeef, and 0xdeadc0de. I was just wondering if anyone knew of any other ones?
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: mnemonic pointers
0xC0FFEE
Re: mnemonic pointers
Hi,
One I use in my project (Caracal) quite a bit: 0xCA8ACA1 - I understand this may be of limited use to anyone else Don't forget the multibot ones, based around 0x..BADB00.. . I'm sure there must be loads of others about.
Cheers,
Adam
One I use in my project (Caracal) quite a bit: 0xCA8ACA1 - I understand this may be of limited use to anyone else Don't forget the multibot ones, based around 0x..BADB00.. . I'm sure there must be loads of others about.
Cheers,
Adam
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mnemonic pointers
Last edited by Troy Martin on Fri Feb 20, 2009 10:28 pm, edited 1 time in total.
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: mnemonic pointers
0xBAB1ED00
(Baby doo)
Google returns nothing - I invented this magic number!
(Baby doo)
Google returns nothing - I invented this magic number!
My OS is Perception.
- steveklabnik
- Member
- Posts: 72
- Joined: Wed Jan 28, 2009 4:30 pm
Re: mnemonic pointers
I was poking around Wikipedia the other day, and found out that Java uses 0xCAFEBABE for .class files...
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: mnemonic pointers
Socks uses 0x464F5800 (on disk) as it's executable signature. I wanted something better for validation than just a plain binary but still simple to handle, so a simple 'cmp dword [bx], 0x00584F46 / jne .cleanup' fit the bill perfectly.
That's the null-terminated ASCII string "FOX" for those who are too lazy to convert it.
That's the null-terminated ASCII string "FOX" for those who are too lazy to convert it.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mnemonic pointers
A Dr. Seuss fan, are we, Firestryke?
I use 0xBADC0FFEE0DDF00D to fill up AX:BX:CX:DX after a register dump is made and the system is halted when TBOS crashes.
I use 0xBADC0FFEE0DDF00D to fill up AX:BX:CX:DX after a register dump is made and the system is halted when TBOS crashes.
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: mnemonic pointers
Another magic number that I have yet to use is 0x467572727946756E because I haven't yet needed a 64-bit magic number, though I did split it and use it as the sentinel values for my memory allocation structure before I stopped working on that project in favor of Socks. I like it, but when it comes to technical definitions it isn't a very good one due to being an even non-negative number without a recognizable bit pattern (unless you view the ASCII translation).
I've also come up with 0xB007 (BOOT) and 0xFB05 (FBOS, for Firebird OS) which are better magic numbers, but 16-bit because Firebird was originally meant to be for the TI-83+.
I've also come up with 0xB007 (BOOT) and 0xFB05 (FBOS, for Firebird OS) which are better magic numbers, but 16-bit because Firebird was originally meant to be for the TI-83+.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mnemonic pointers
That's just a little disturbing.Firestryke31 wrote:0x467572727946756E
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: mnemonic pointers
And why is that?
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
-
- Member
- Posts: 391
- Joined: Wed Jul 25, 2007 8:45 am
- Libera.chat IRC: aejsmith
- Location: London, UK
- Contact:
Re: mnemonic pointers
Although its a short one, an older version of my kernel used 0xEF as its system call interrupt number - stands for "Exclaim FTW!" . I also use this for other magic numbers - for example, I use a special ELF auxilary vector type, 0xEFEF0001, to pass the address of the kernel-provided system call library to userspace apps.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mnemonic pointers
I used to use 0x534F4254 (little endian, so stored in a NASM dd) to signify TBOS programs in the pre-release of 0.5.0 before I decided to stick with a flat binary. I plan to crash TBOS32 with something funny in a 128-bit way
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: mnemonic pointers
Another signature I used once or twice was 0x31415926 because while it isn't supposed to be ASCII it can still be typed using the keyboard ("1AY&").
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
Re: mnemonic pointers
0xDEADBABA is my favourite. From an ex maths teacher who liked dead baby jokes, and who would answer multiple-choice question papers with that order of answers (from A - D) to see how he scored.