Enviado em 27/10/2018 - 10:58h
Olá Pessoal !
Estou atualizando uma API JIT( x86 ) 32/64 Bits e resolvi para testar criar uma Simples Linguagem ( Assembler ) para "brincar"...
Testado em:
01 - Windows 7 - 32 e 64 Bits
02 - Linux - 32 e 64 Bits
Projeto aqui:
https://github.com/gokernel2017/asm
Exemplo test.asm:
OBS: As chamadas de funcões por enquanto só está implementada para 2 argumentos ...
Para compilar leia o arquivo README.txt ou:
Projeto em BETA AINDA ...
Estou atualizando uma API JIT( x86 ) 32/64 Bits e resolvi para testar criar uma Simples Linguagem ( Assembler ) para "brincar"...
Testado em:
01 - Windows 7 - 32 e 64 Bits
02 - Linux - 32 e 64 Bits
Projeto aqui:
https://github.com/gokernel2017/asm
Exemplo test.asm:
Estou implementando um "assembler" em MAIS Alto Nível.
//-----------------------------------------------
//
// Simple Example:
//
// FILE:
// test.asm
//
// USAGE:
// simple test.asm
//
//-----------------------------------------------
//
long a
long b
#ifdef __x86_32__
sub $16, %esp
#endif
#ifdef __x86_64__
hello
#endif
label_hello:
mov $1000, a
mov $1500, b
// call function with argument: 1
//
info 1
version
OBS: As chamadas de funcões por enquanto só está implementada para 2 argumentos ...
Para compilar leia o arquivo README.txt ou:
Para testar:
// TO COMPILE IN 32 BITS:
// gcc -c src/asm.c -m32 -Wall
// gcc src/simple.c -o simple asm.o -m32 -Wall
//
//
// TO COMPILE IN 64 BITS:
// gcc -c src/asm.c -m64 -Wall
// gcc src/simple.c -o simple asm.o -m64 -Wall
E se alguém gostou do projeto, favor clicar na "strela" lá no github... ;)
simple test.asm
Projeto em BETA AINDA ...