Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Old 8086 version/Venksi's self-assembling assembler+runcom (Miscellaneous)

posted by Arjay(R), 27.03.2012, 21:35
(edited by Arjay on 27.03.2012, 23:23)

> Actually, a fair number of assemblers are written in themselves (e.g.
> Octasm, FASM), so it'd be easier just to use one of those, though I admit
> those aren't 8086 friendly. (But check out Venksi's very tiny 8086 one
> here.)

Also worth noting that Venksi's self-assembling assembler is preinstalled on JSLinux and runs happily via Fabrice Bellard's runcom:
[arjay@linuxbox asm]$ runcom hpigot.s
[arjay@linuxbox asm]$ ls -al hpigot.*
-rwxrwxr-x 1 arjay linux   77 2012-03-27 21:23*
-rwxrwxr-x 1 arjay linux  378 2012-03-27 21:23 hpigot.lst*
-rw-rw-r-- 1 arjay linux 4043 2012-03-27 21:15 hpigot.s
[arjay@linuxbox asm]$ echo u | runcom
1526:0100 BD1027        MOV     BP,2710
1526:0103 BB427F        MOV     BX,7F42
1526:0106 8BCB          MOV     CX,BX
1526:0108 B002          MOV     AL,02
1526:010A BF4D01        MOV     DI,014D
1526:010D F3AB          REP     STOSW
1526:010F 53            PUSH    BX
1526:0110 F7E3          MUL     BX
1526:0112 96            XCHG    AX,SI
1526:0113 8BFA          MOV     DI,DX
1526:0115 03DB          ADD     BX,BX
1526:0117 4B            DEC     BX
1526:0118 8B874C01      MOV     AX,[BX+014C]
1526:011C F7E5          MUL     BP
1526:011E 03C6          ADD     AX,SI
[arjay@linuxbox asm]$ runcom

As per my comments on runcom thread, obviously not all programs compiled with will run under runcom (currently) due to limited interrupt support:

[arjay@linuxbox asm]$ ls*  Changelog  display.s*  equ.s*   input.s*     lister.s*   output.s*    support.s*  symtab.i*
asm.s*    direct.s*  dos.i*      expr.s*  license.txt  message.s*  readme.txt*  symbols.s*  symtab.s*
[arjay@linuxbox asm]$ ls -al display.s
-rwxr-xr-x 1 arjay linux 2240 2009-04-21 18:25 display.s*
[arjay@linuxbox asm]$ runcom display.s
[arjay@linuxbox asm]$ ls -al
-rwxrwxr-x 1 arjay linux 224 2012-03-27 20:19*
[arjay@linuxbox asm]$ runcom
[arjay@ asm]$ debug

unhandled vm86 return code (0x1)
EAX=0001005c EBX=00020000 ECX=004000e2 EDX=bfe900ae
ESI=00000000 EDI=00000002 EBP=00000000 ESP=0000fff0
EIP=0000ffff EFL=000b0246
CS=1526 DS=1526 ES=1526 SS=1526 FS=0000 GS=0000
[arjay@linuxbox asm]$

However at least being able to compile DOS asm programs like this from the Linux command-line may be of interest/use to some people.


Complete thread:

Back to the forum
Board view  Mix view
15317 Postings in 1383 Threads, 254 registered users, 15 users online (0 registered, 15 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum