Idioma :

Compilar Mads en Linux

Para compilar en Linux el ensamblador más famoso y más actualizado, solo debes tener instalado el Free Pascal y la fuente del Mads.


Partimos agregando el paquete del Free Pascal Compiler llamado fpc desde el terminal :

sudo apt install fpc

Ahora vamos al repositorio oficial del fuente del Mads lo descargamos y descomprimimos.
A continuación procedemos a compilarlo :

cd Mad-Assembler-2.1.0
fpc -Mdelphi -vh -O3 mads.pas

En el proceso verás los siguiente en el terminal :

Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.4+dfsg-22 [2019/01/24] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling mads.pas
mads.pas(1089,5) Note: Local variable "i" is assigned but never used
mads.pas(1798,17) Hint: Variable "a" of a managed type does not seem to be initialized
mads.pas(2581,35) Hint: Variable "i" does not seem to be initialized
mads.pas(3235,3) Hint: Variable "a" of a managed type does not seem to be initialized
mads.pas(3561,21) Hint: Variable "war" of a managed type does not seem to be initialized
mads.pas(3654,29) Hint: Local variable "par" of a managed type does not seem to be initialized
mads.pas(4603,28) Warning: Local variable "tmp" of a managed type does not seem to be initialized
mads.pas(6190,10) Warning: Local variable "par" of a managed type does not seem to be initialized
mads.pas(8189,49) Warning: Local variable "str" of a managed type does not seem to be initialized
mads.pas(8790,46) Warning: Local variable "all" does not seem to be initialized
mads.pas(8943,16) Hint: Variable "k" does not seem to be initialized
mads.pas(9706,26) Hint: Local variable "par" of a managed type does not seem to be initialized
mads.pas(12646,47) Hint: Local variable "txt" of a managed type does not seem to be initialized
mads.pas(10184,27) Hint: Local variable "par" of a managed type does not seem to be initialized
mads.pas(12646,51) Hint: Local variable "tmp" of a managed type does not seem to be initialized
mads.pas(11626,52) Warning: Local variable "idx" does not seem to be initialized
mads.pas(11626,51) Warning: Local variable "idx" does not seem to be initialized
mads.pas(12646,53) Hint: Local variable "v" does not seem to be initialized
mads.pas(12766,54) Hint: Local variable "r" does not seem to be initialized
mads.pas(13154,29) Hint: Local variable "tmpZM" of a managed type does not seem to be initialized
mads.pas(15252,21) Hint: Variable "nam" of a managed type does not seem to be initialized
Linking mads
/usr/bin/ld.bfd: aviso: link.res contiene secciones de salida. ¿Olvidó -T?
15707 lines compiled, 0.8 sec
6 warning(s) issued
16 hint(s) issued
1 note(s) issued

Hay varios Hints y Warning es lo normal, ahora lo ejecutamos para ver si funciona :

./mads

https://www.atariware.cl/archivos/mads/madslinux.png

Como se ve en la imagen esta todo ok. Lo ultimo por hacer es agregar al sistema para que sea reconocido desde cualquier directorio donde estemos trabajando para ello ejecutamos lo siguiente :

sudo cp mads /usr/bin/

Por ultimo si no quieres compilarlo aquí está disponible el binario para Linux.