Skip to content

An assembler compiler with special instruction sets written in C language.

License

Notifications You must be signed in to change notification settings

cbozan/my_assembler_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Assembler Compiler

An assembler compiler with special instruction sets written in C language.

Tokenizer

Let's run the makefile first and then the main.exe.

mingw32-make & main

 

Let's write the path of the file to be tokenized in the path part. (if the file is in the same directory you can just type its name)

source

SS

image  

Parser

Compile and run.

gcc parser.c -o parser & parser

 

Let's write the path of the file to be compiled in the path part. (if the file is in the same directory, just type its name)

source2

SS

image

 

Assembler

Compile and run.

gcc assembler.c -o assembler & assembler

 

Let's write the path of the file to be compiled in the path part. (if the file is in the same directory, just type its name)

source3

 

source3 - Program to add numbers from 1 to 10 - The result is inside the AX register

HRK AX, 0
HRK BX, 1
HRK CX, 11
loop:
	TOP AX, BX
	TOP BX, 1
	HRK DX, BX
	CIK DX, CX
	SN loop

SS

image  

Task

Add input and output buffers. Nice toy for those who are interested :)