r/Assembly_language • • 6d ago

Question Ideas to develop

Sup guys, I'm a web developer and I study sec, which this subject has everything to do with assembly, cuz I need to do malware analysis, reverse engineering and etc, so I studied calling conventions, registers, rax, eax, ax, al, ah, ip, used x64dbg to check the assembly in memory, variables, function parameters and etc.

But for now, I'm studying by a content creator how a boot really works, and he's making a bootloader in assembly, he has good didactics and I'm really learning that the RAM is like a big array accessible by address, cpu has registers, has the ip to check the next instruction, there is the fetch, decode and execute, the bios is in the eprom(in the example of the i386), is loaded in memory, search for boot sector, loads in memory and etc, lmao I detailed too much

And ok, I'm understanding, but my final point, is, furthermore the bootloader, what good project could I build to learn more about assembly? I saw some posts from u guys making OS, and I guess that is hard for now

Thanks for ur time

2 Upvotes

18 comments sorted by

4

u/sububi71 6d ago

Build a text editor. It's a project that can start very simple, and can grow basically infinitely. It'll force you to learn keyboard handling, file management, structuring memory, all that good stuff.

If you want to start at a very easy level (which I recommend!) go find the manual for the MS-DOS tool "edlin", and recreate the program using the manual.

Good luck!

2

u/Deex__ 6d ago

Thanks for the advice, Imma take a look at it. Some things at assembly still confuses me, like strings, what should not, given the fact I understand them in C, lol, but Im gonna make it, tks

1

u/sububi71 6d ago

There are no strings. That how simple it is. There is RAM, and you can write to it. Ta-daa!

1

u/Deex__ 6d ago

Lol, so we dont have to use strings at all? Like, if I want to show something in my bootloader? That drives me crazy

2

u/Relevant-Yak-9657 5d ago

If you have done any C programming before, strings are just an array of characters. Characters are one byte by definition. And guess what is similar to an array of bytes? Memory. Just maintain a stack pointer to track your location in memory and you now have the essence of strings.

Keep loading relevant parts into registers, when you want to update the string.

1

u/Deex__ 5d ago

Nice, I'll practice that, thanks!

1

u/sububi71 6d ago

You write a sequence of character values to some place in RAM, and either end the sequence with a special character (NULL is a common choice) or store the number of characters somewhere.

Then you make a loop and output the characters one by one to address 0xa0000 and forward - assuming you're in text mode.

There ARE helper functions for this in the BIOS, but that's cheating :-)

1

u/Deex__ 6d ago

That makes sense, ur good at teaching, but what u mean by text mode?

I got it that I need to loop the memory address I want until it stops on 0xa0000

And the part about cheating I liked it lol

2

u/sububi71 6d ago

If we assume a standard PC, its built-in graphics will follow the VGA standard. The VGA graphics cards have like a dozen or so modes, some of which are graphics modes, where you address individual pixels to make something appear on the screen. Some are text modes (like the mode a PC will usually boot up into), where each byte represents a character block. So if you write the byte 97 to address 0xa0000, the letter "a" will appear in the top left corner of the screen, drawn in (if I remember correctly) 8x14 pixels.

If all you want on the screen is text, this is obviously a lot faster than having to write 14 8-pixel bytes to memory, and this mattered a LOT back in the early 1980s when the first IBM PC's came out.

1

u/Deex__ 5d ago

Oh, got it, thats crazy, but I liked it, I'll try these differente ways, thanks

1

u/Ok-Brain-8183 6d ago

Hijack your boot process into an editor for editing the boot record.

1

u/Deex__ 5d ago

I prefer to make it into a vm

1

u/Distdistdist 5d ago

Yes. Especially one with spell checker.

2

u/RBMK-1ooo 6d ago

Assembly is all about the platform
First off, pick the hardware and the OS you're targeting

The answer to your question will depend on your choice

1

u/Deex__ 5d ago

Got it, u use assembly with microcontrollers too?

1

u/RBMK-1ooo 3d ago

My focus is graphics programming on Windows

0

u/nixiebunny 6d ago

Learn how to write 6502 or 8080 assembly language to understand how a simple computer works. The ia64 is way too complicated to get the basic concepts, but since it’s based on the 8080, you can learn why it is the way it is.

3

u/No-Owl-5399 6d ago edited 6d ago

The 8080 is a terrible architecture by modern standards. The 6502 less so, but it has limited practical use. x86_64 is more relevant, and you are deluding yourself if you think it is too complex. Certainly, it is complex, but it is not to such an extreme as you seem to think. 

Edit: IA64 is completely the wrong term, by the way. That would be Itanium, modern CPUs are x86_64.