keropquestions.blogg.se

Making my own linux disassembler
Making my own linux disassembler













  1. #MAKING MY OWN LINUX DISASSEMBLER SOFTWARE#
  2. #MAKING MY OWN LINUX DISASSEMBLER CODE#
  3. #MAKING MY OWN LINUX DISASSEMBLER FREE#

Therefore, when you build/tweak your own custom Linux distro, you also get to learn about the nuts and bolts of Linux. LFS without a doubt one of the best, as it takes a little bit of reading. And the best part is, it is entirely from source code. It is a project that provides step-by-step instructions for building a custom Linux distribution. When it is about creating your own Linux distro, Linux from scratch is another platform that one should try.

#MAKING MY OWN LINUX DISASSEMBLER FREE#

This tool to create your Linux distro is open source and free to use.Īlso, to get started with Respin, you can check out their guide to create your own distro. That is not all, Respin can also make a live version of the created OS, and even make a backup for a fresh install. Using Respin, one can now create its own distro.

#MAKING MY OWN LINUX DISASSEMBLER SOFTWARE#

If in case you don’t know what is remastersys, it is a free and open-source program for Debian, Ubuntu-based, Linux Mint or derivative software systems that were used create a customized Live CD/Live USB (a remaster) of Debian and its derivatives.

making my own linux disassembler

Linux Respin is the fork of discontinued remastersys. In this article, we list some of the best tools that you can use to work on your next or first custom Linux distribution. So, in order to tweak or build your own Linux distro, you need to have some specific tools. However, there are people who don’t want to use ready-to-use Linux distros, rather, they want something that specifically serves the user’s need. There are several Linux distributions out there on the internet - some are officially created by a firm or organisation and some are created by individuals. I can compare the result with another assemblers but in very limited way, as the don't support TASM-like macro, for example, or some instructions.When we talk about Linux, the first thing that strikes us is that we can tweak or create our own distro.

#MAKING MY OWN LINUX DISASSEMBLER CODE#

What is the better way of testing this kind of programs? I can compile all instruction but in real code there may be issues. It is poorly do it on 30-40% because of relative jump calculation issues. At the moment there is bugs in logic.Īs main test for the assembler I set to compile Monitor 48 written for TASM. I want to implement a Forth on the same base. The main advantage of a table is ease of adding new CPU support. The resulted code is large enough (~300kb) because of table, but it doesn't matter.

making my own linux disassembler

If ( 0 > vasprintf ( &string, format, args ) ) string = NULL Is very simple - just read byte-by-byte and see if it prefix or not - then just look in the table for opcode and get corresponding mnemonic and print it char* compile_string ( const char* format. I don't need to format it manually - it all automatic. Printf ( new_opc->mnemo, ( uint16_t ) data ) On the first pass if there is a label it is substituted by INTMAX_MIN on Bison side, so if there is INTMAX_MIN as argument on the second run I suppose I should look into hashtable for previously calculated addressĪs I use preformatted mnemonic in the table, it is very simple to print it out: if ( PASS2 = run_pass & verbose ) It is followed by simple linear search by string (the first optimisation I see - use string hashes and binary search) const opcode_table* new_opc = find_opcode ( instruction ) And then it passes to the handle function: int handle_instruction ( char* instruction, intmax_t data, size_t size ) Addresses and user variables is hold in hash tables (UThash is used).Įach instruction user wrote is converted to the specific form, like DJNZ %#.2x in this example (if Bison was able to form the string and it is correct). The first one there is only dry run in order to calculate labels' offsets, expand macroses etc. Source code is parsed by means of GNU Bison/Flex two times. The table itself is the same for assembler and disassembler. I created a table describing each instruction I found on the Net: typedef struct I want to know whether my idea is weird, wrong, bad by design or not so bad. I have never hacked others' assembler source codes as I want to do it the way I imagine it. I want to implement all known instructions, like LD D, RES 0, (IX + n) even if it will never be used.

making my own linux disassembler

So I started from assembler/disassembler for Linux, though there is a lot of Z assemblers. One of my wishes not only make hardware, but software too.

making my own linux disassembler

I have a long-term project: DIY computer with various processors.















Making my own linux disassembler