rr
Berlin, Germany, 07.04.2018, 17:09 |
Ugliest ASM source code ever?! (Developers) |
Can you top this?
JMPS(S)
=A1= 'Hello World !'
=A2= 0A
=S= AX,B800;ES,AX;AX,3;INT10
CX,(A2-A1);SI,(A1);DI,500
AH,[(A2)]
=L= LODSB;STOSW;LOOP(L)
RET
This was a short example from http://www.evmsoft.net/ru/asm.html.
Another one (from the archive):
ah,09;dx,(str);int21;ret
=str= 'Hello USSR !!!$'
Now imagine the whole assembler (>32k) is written in this style! The problem is not the syntax itself, although it's different from any other x86 assemblers. But why would anyone format his/her source code like that? --- Forum admin |
RayeR
CZ, 08.04.2018, 19:02
@ rr
|
Ugliest ASM source code ever?! |
Passed through an obfucator? :) --- DOS gives me freedom to unlimited HW access. |
RayeR
CZ, 08.04.2018, 19:03
@ RayeR
|
Ugliest ASM source code ever?! |
> Passed through an obfucator? :)
BTW I don't like AT&T ASM but this seems to be even worse... --- DOS gives me freedom to unlimited HW access. |
rr
Berlin, Germany, 30.10.2018, 12:10
@ rr
|
Ugliest ASM source code ever?! |
> This was a short example from
> http://www.evmsoft.net/ru/asm.html.
> Another one (from the archive):
>
> ah,09;dx,(str);int21;ret
> =str= 'Hello USSR !!!$'
Well-formatted:
=start=
ah, 09
dx, (Message)
int 21
ret
=Message=
'hello, world'; 0D; 0A; '$' --- Forum admin |
rr
Berlin, Germany, 30.10.2018, 12:11
@ rr
|
Ugliest ASM source code ever?! |
> Now imagine the whole
> assembler
An x86 assembler in 7,777 bytes is not bad. --- Forum admin |
Rugxulo
Usono, 02.11.2018, 15:13
@ rr
|
Ugliest ASM source code ever?! |
> An x86 assembler in 7,777 bytes is not bad.
True, although I've not tested that one (yet?).
But that reminds me of the one by Venkat Iyer (actually smaller, barely, ~7200 bytes):
* https://github.com/catb0t/x86-s
* https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/asm/venksi/
IIRC, the LF ending fix (not in a full, newer release) was requested by Fabrice Bellard for his JSLinux since he included it there (for obscure reasons). I'm sure Arjay can tell us more.
I don't have tons of experience with it, only wrote (ported?) like two extremely simple utils to it, for fun. It, too, is a bit quirky in syntax, but it does work! (It can also assemble itself, so that's good.) |
Rugxulo
Usono, 14.01.2019, 19:12
@ Rugxulo
|
BatAs -- 8086 assembler written in MSDOS batch |
On a barely related note:
> BatAs
>
> This is a 8086 assembler written in MSDOS batch. It depends on just two
> utilities: RPN.COM and APPFB.COM, the rest is completely in batch.
No, I haven't tried it, but it sounds interesting! |