HEX BOOT Loader
HEX BOOT Loader
I have been trying out assembly lately and I pretty much stink but I am able to program in a hex editor for some reason better than with assembly. How reasonable would it be to write a bootloader just from the hex opcodes?
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
rofl Do you want to write direct machine code?
Sorry for insulting your person, but you didn't even knew to build a BAT file for nasm...
But anything can be done, maybe I'm just wrong.
Regards
inflater
Sorry for insulting your person, but you didn't even knew to build a BAT file for nasm...
But anything can be done, maybe I'm just wrong.
Regards
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Derrick operating system: http://derrick.xf.cz (Slovak and English )
lol, if you have the time, patience, and skill... go for it. It would be some hardcore control over your OS if you know how to do it right.
Website: https://joscor.com
Isn't ASM just a readable version of the machine code/ hexcode? and if so how in the world do you figure it is easier to remember 0110 0101 0101 1011 = 655B = MOV Al, 11 (NOT REAL VALUES) but the point is that you have to do the translation in your head or on paper so aside from learning a few things about your particular ASM compiler I don't see how hexcode could possible be easier than ASM. Please enlighten me
NOTE: I realise that I don't know the opcodes that corrispond to the ASM commands and am not really sure whether it is 8, 16, or 32 bits for each command but I know that x86 from Art of Assembly uses an 8bit opcode with an 8bit information portion attached. so my example could be completely wrong but the question is still a valid one.
NOTE: I realise that I don't know the opcodes that corrispond to the ASM commands and am not really sure whether it is 8, 16, or 32 bits for each command but I know that x86 from Art of Assembly uses an 8bit opcode with an 8bit information portion attached. so my example could be completely wrong but the question is still a valid one.
Getting back in the game.
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
If you could work manually and efficiently with opcodes, then it would be the easiest system to debug! You'd just have to print a hex layout of a section of the memory!AJ wrote:If you find hex opcodes easier and quicker to program in and debug than asm, why not? Makes me think that your username is apt, though
Cheers,
Adam
My OS is Perception.
Hi,
When I was a teenager, I used to program in decimal bytes for 6502 machine code - not because I wanted to, but because I didn't have a choice.
Cheers,
Brendan
When I was a teenager, I used to program in decimal bytes for 6502 machine code - not because I wanted to, but because I didn't have a choice.
If you can work efficiently with hex bytes, then it'll still be a code maintenance nightmare - something as simple as inserting a few instructions into existing code would involve searching for all CALL, JMP and branch instructions and adjusting the target addresses, and possibly even adjusting all memory accesses in (what would normally be) the ".data" section.If you could work manually and efficiently with opcodes, then it would be the easiest system to debug! You'd just have to print a hex layout of a section of the memory!
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
You'd have to plan out your entire program on paper, then write the entire program leaving a place holder for your address locations and coming back to fill them in once you are done.Brendan wrote:If you can work efficiently with hex bytes, then it'll still be a code maintenance nightmare - something as simple as inserting a few instructions into existing code would involve searching for all CALL, JMP and branch instructions and adjusting the target addresses, and possibly even adjusting all memory accesses in (what would normally be) the ".data" section.
It might work for something small like a boot loader, but for anything more complex it'd just be pointless.
My OS is Perception.
- JackScott
- Member
- Posts: 1036
- Joined: Thu Dec 21, 2006 3:03 am
- Location: Hobart, Australia
- Mastodon: https://aus.social/@jackscottau
- Matrix: @JackScottAU:matrix.org
- GitHub: https://github.com/JackScottAU
- Contact:
Hi,
Quite simply, there wasn't any assembler.
Of course after messing about with little bitmap editors, simple games, etc (in "assembly assisted BASIC") the first serious piece of software I wrote was an assembler..
Cheers,
Brendan
For me, the code looked (very roughly) like:Yayyak wrote:Which basically just involves writing the program in assembly, and assembling it by hand. I've done that, and it does beg the question "Why not just use the assembler?".
Code: Select all
10 DATA 12, 15, 213, 203, 34, 103, 130, 102, 96, 21
20 DATA 92, 43, 123, 141, 205, 12, 15, 20, 4
100 for i = 0 to 18
110 read a;
120 poke 49152+i, a
130 next
140 sys 49152
150 exit
Of course after messing about with little bitmap editors, simple games, etc (in "assembly assisted BASIC") the first serious piece of software I wrote was an assembler..
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Hi,
Cheers,
Brendan
A human that single steps through your code (e.g. using Bochs debugger) is omniscient - they see everything you could possibly do. Resistance is futile. All your base are belong to us.exkor wrote:Does anybody know any ways of hiding writes to code section? so that human has troubles seeing it?
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.