Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

(My) fork of 8086 Assembler for DOS (Announce)

posted by Japheth Homepage, Germany (South), 26.12.2020, 18:14
(edited by Japheth on 26.12.2020, 18:31)

> > - no END directive (important, since it allows "self-compiling" .BAT
> > files)
>
> What do you mean?

Here's an example, named TEST.BAT:

;echo off
;goto start

_CODE segment
        org 100h
        mov dx,offset string1
        mov ah,9
        int 21h
        mov ax,4c00h
        int 21h

string1 db "hello",13,10,'$'
_CODE ends

END
:start
jwasm -q -bin -Fotest.com test.bat
test.com


No problem with jwasm - to work with ASM.COM it needs a working END directive.

EDIT: it actually works with ASM.COM as well, although not perfectly:


;echo off
;asm.com test.bat
;test.com
;exit

        mov dx,string1
        mov ah,9
        int 21h
        mov ax,4c00h
        int 21h

string1: db "hello",13,10,'$'


A :END label to skip the assemble code would be better, since the "exit" terminates batch processing. And one problem that remains is that the assembler cannot be told to be silent.

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
22370 Postings in 2073 Threads, 400 registered users, 88 users online (1 registered, 87 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum