2024-12-22 18:18:41 +01:00
2024-10-23 11:19:12 +02:00
2024-12-22 14:08:57 +01:00
2024-12-21 10:46:35 +01:00
2024-12-22 18:18:41 +01:00
2024-10-22 16:42:28 +02:00
2024-10-23 20:48:18 +02:00
2024-12-22 14:08:57 +01:00
2024-12-13 18:08:26 +01:00
2024-12-06 17:11:27 +01:00

Assembleur

Usage

./Assembleur [--help] [--reversed] [--version] [--output file] [--format type] file

There are 3 format types :

  • "int" : 32 bits integers are written. Exemple : 10878976
  • "binint" : bits are written. Exemple : 00000000 10100110 00000000 00000000
  • "bin" : the file is written in pure binary
  • "logisim" (default) : the file is written in hexa for use in LogiSim

Exemple

operations:
	ADD R1 R2 #1
	SUB R1 R2 R3
	AND R1 R2 #33
	XOR R1 R2 R3
	OR R1 R2 R3
	SL R1 R2 R3
	SR R1 R2 R3
	MUL R1 R2 R3
io:
	STR R1 R2
	LD R1 R2
sauts:
	JMP controle
	JEQU R1 R2 io
	JNEQ R1 R2 sauts
	JSUP R1 R2 operations
	JINF R1 R2 controle
controle:
	CALL io
	RET

Produces

00000100 10100000 00000000 00000001
00001000 10100110 00000000 00000000
00010100 10100000 00000000 00100001
00100000 10100110 00000000 00000000
00011000 10100110 00000000 00000000
00101000 10100110 00000000 00000000
00110000 10100110 00000000 00000000
00111000 10100110 00000000 00000000
01000000 10100000 00000000 00000000
01001000 10100000 00000000 00000000
11000000 00000000 00000000 00001111
11001000 10100000 00000000 00001000
11010000 10100000 00000000 00001010
11011000 10100000 00000000 00000000
11100000 10100000 00000000 00001111
11101000 00000000 00000000 00001000
11111000 00000000 00000000 00000000

Other examples are located in the examples folder

Releases

Pre-compiled binaries are available in the Release section.

Build

If you wish to compile yourself, you must have xmake installed. Instructions on how to install (and you should) here

xmake

Run

xmake run Assembleur [args]

Example :

xmake run Assembleur test.asm -o memory

Parses the file test.asm and writes the output into the file memory

Install

You can also add the binary to your path using

xmake install

or copy the binary in the bin folder after

xmake install -o .
Description
No description provided
Readme 80 KiB
v1.9 Latest
2024-12-21 09:46:52 +00:00
Languages
C++ 80.5%
Assembly 17.6%
Lua 1.9%