Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Modeling paged and segmented memories is tricky business. -- P. J. Denning


devel / comp.os.msdos.programmer / Looking for .COM program sources in NASM Assembly

SubjectAuthor
* Looking for .COM program sources in NASM AssemblyPaolo Amoroso
+- Looking for .COM program sources in NASM AssemblyKerr-Mudd, John
+* Looking for .COM program sources in NASM AssemblySteve Nickolas
|+- Looking for .COM program sources in NASM AssemblyPaolo Amoroso
|`* Looking for .COM program sources in NASM AssemblyKerr-Mudd, John
| `- Looking for .COM program sources in NASM AssemblySteve Nickolas
`* Looking for .COM program sources in NASM AssemblyHerbert Kleebauer
 +* Looking for .COM program sources in NASM AssemblyHerbert Kleebauer
 |`* Looking for .COM program sources in NASM AssemblyKerr-Mudd, John
 | `- Looking for .COM program sources in NASM AssemblyHerbert Kleebauer
 `* Looking for .COM program sources in NASM AssemblyPaolo Amoroso
  `- Looking for .COM program sources in NASM AssemblyHerbert Kleebauer

1
Looking for .COM program sources in NASM Assembly

<24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=645&group=comp.os.msdos.programmer#645

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a05:622a:14cd:b0:344:6cfa:42f9 with SMTP id u13-20020a05622a14cd00b003446cfa42f9mr35471544qtx.147.1662288501610;
Sun, 04 Sep 2022 03:48:21 -0700 (PDT)
X-Received: by 2002:a05:6808:21a5:b0:345:81a8:ab6 with SMTP id
be37-20020a05680821a500b0034581a80ab6mr5247009oib.91.1662288501349; Sun, 04
Sep 2022 03:48:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Sun, 4 Sep 2022 03:48:21 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=93.148.128.70; posting-account=uOUOHg4AAADo8AO9B3SI43ekV3AA6lU0
NNTP-Posting-Host: 93.148.128.70
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
Subject: Looking for .COM program sources in NASM Assembly
From: paolo.amoroso@gmail.com (Paolo Amoroso)
Injection-Date: Sun, 04 Sep 2022 10:48:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1578
 by: Paolo Amoroso - Sun, 4 Sep 2022 10:48 UTC

I'm looking for source code of MS-DOS .COM programs in real-mode 8086 Assembly written in NASM syntax. Any repositories or recommendations?

I'm learning Assembly programming under MS-DOS (and MikeOS). To avoid the complexity of x86 segmentation, for the time being I prefer to focus on single-segment programs, as I plan to write small programs anyway. So I'd like to study examples of how such systems organize and reference data and code. I searched a bit but found remarkably little .COM code.

Re: Looking for .COM program sources in NASM Assembly

<20220904140533.8f7c02c0095715052fc8a021@127.0.0.1>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=646&group=comp.os.msdos.programmer#646

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: admin@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Sun, 4 Sep 2022 14:05:33 +0100
Organization: Dis
Lines: 43
Message-ID: <20220904140533.8f7c02c0095715052fc8a021@127.0.0.1>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="82e73e0801c93ae1eebf250365fc66fe";
logging-data="3409538"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+e7s1duFTsK/8VXnN/Icqm+G6JmmF31lM="
Cancel-Lock: sha1:s6N4YvS+bHKcUTAP4guadDTSS84=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
;X-no-Archive: Maybe
GNU: Terry Pratchett
 by: Kerr-Mudd, John - Sun, 4 Sep 2022 13:05 UTC

On Sun, 4 Sep 2022 03:48:21 -0700 (PDT)
Paolo Amoroso <paolo.amoroso@gmail.com> wrote:

> I'm looking for source code of MS-DOS .COM programs in real-mode 8086 Assembly written in NASM syntax. Any repositories or recommendations?
>
> I'm learning Assembly programming under MS-DOS (and MikeOS). To avoid the complexity of x86 segmentation, for the time being I prefer to focus on single-segment programs, as I plan to write small programs anyway. So I'd like to study examples of how such systems organize and reference data and code. I searched a bit but found remarkably little .COM code.

Just to get you going

; Hi.com
;13:54 2022-09-04 23 clean asm
;13:58 2022-09-04 23 to middle of screen added comments
;14:01 2022-09-04 22 commented out section header; no aligment
cpu 8086
org 0x100
;section .code ; not required
mov ah,0xB8 ; B800 text mode screen seg
push ax
pop es ; es:di pts to scrn
mov si,WelcomeStr ;
mov cl,WelcomeLth ;
mov ah,02 ; green
mov di,2*(12*80+40) ; middle of screen
PrtaChar: ; printloop
lodsb ; get a char
stosw ; put char to screen, attribute in ah
loop PrtaChar
ret ; all done
;section .data ; not required for this example
WelcomeStr db 'Hi!'
WelcomeLth equ $-WelcomeStr

Sorry, I've tried DDGo and got lots of dead ends too. try clax for some
older posts, but I'm not suggesting my stuff is best practice!

news:comp.lang.asm.x86
(moderated, so your post might not show up for a while)

--
Bah, and indeed Humbug.

Re: Looking for .COM program sources in NASM Assembly

<alpine.DEB.2.21.2209041247100.5131@sd-119843.dedibox.fr>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=647&group=comp.os.msdos.programmer#647

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: usotsuki@buric.co (Steve Nickolas)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Sun, 4 Sep 2022 12:47:53 -0400
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <alpine.DEB.2.21.2209041247100.5131@sd-119843.dedibox.fr>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader01.eternal-september.org; posting-host="50bca9bcf320da8749a6d2a1d8fb803a";
logging-data="3449040"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HRI65qS2hVtrtQwRou/+PcFj+bZnQeFo="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:B4cYT5k5WP+G8VJYZA+0ZmppXng=
X-X-Sender: mary@sd-119843.dedibox.fr
In-Reply-To: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
 by: Steve Nickolas - Sun, 4 Sep 2022 16:47 UTC

On Sun, 4 Sep 2022, Paolo Amoroso wrote:

> I'm looking for source code of MS-DOS .COM programs in real-mode 8086
> Assembly written in NASM syntax. Any repositories or recommendations?
>
> I'm learning Assembly programming under MS-DOS (and MikeOS). To avoid
> the complexity of x86 segmentation, for the time being I prefer to focus
> on single-segment programs, as I plan to write small programs anyway. So
> I'd like to study examples of how such systems organize and reference
> data and code. I searched a bit but found remarkably little .COM code.

I happen to have some in https://github.com/buricco/doslite

-look for the .a86 files.

-uso.

Re: Looking for .COM program sources in NASM Assembly

<c0b8ff7f-37a3-4cc2-a525-eac00fb3364fn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=648&group=comp.os.msdos.programmer#648

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a05:620a:290d:b0:6b5:cecc:1cab with SMTP id m13-20020a05620a290d00b006b5cecc1cabmr30399661qkp.465.1662363575917;
Mon, 05 Sep 2022 00:39:35 -0700 (PDT)
X-Received: by 2002:a05:6870:559b:b0:11c:cbbf:65b0 with SMTP id
n27-20020a056870559b00b0011ccbbf65b0mr7995811oao.91.1662363575629; Mon, 05
Sep 2022 00:39:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Mon, 5 Sep 2022 00:39:35 -0700 (PDT)
In-Reply-To: <alpine.DEB.2.21.2209041247100.5131@sd-119843.dedibox.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=93.148.128.70; posting-account=uOUOHg4AAADo8AO9B3SI43ekV3AA6lU0
NNTP-Posting-Host: 93.148.128.70
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com> <alpine.DEB.2.21.2209041247100.5131@sd-119843.dedibox.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c0b8ff7f-37a3-4cc2-a525-eac00fb3364fn@googlegroups.com>
Subject: Re: Looking for .COM program sources in NASM Assembly
From: paolo.amoroso@gmail.com (Paolo Amoroso)
Injection-Date: Mon, 05 Sep 2022 07:39:35 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1276
 by: Paolo Amoroso - Mon, 5 Sep 2022 07:39 UTC

Kerr-Mudd, Steve, thanks for the code and the advice.

Re: Looking for .COM program sources in NASM Assembly

<20220905105449.059e174439713f6ccc4265e3@127.0.0.1>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=649&group=comp.os.msdos.programmer#649

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: admin@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Mon, 5 Sep 2022 10:54:49 +0100
Organization: Dis
Lines: 24
Message-ID: <20220905105449.059e174439713f6ccc4265e3@127.0.0.1>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
<alpine.DEB.2.21.2209041247100.5131@sd-119843.dedibox.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="d4088b520a6f4b8a3c88a1111f5f06bd";
logging-data="3729165"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lWEaXe94QKDw0MjMA0dYhNtTD1uf0Gak="
Cancel-Lock: sha1:Sfd04WK1hiyhLUBQ+XhKF2Q7fI4=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
GNU: Terry Pratchett
;X-no-Archive: Maybe
 by: Kerr-Mudd, John - Mon, 5 Sep 2022 09:54 UTC

On Sun, 4 Sep 2022 12:47:53 -0400
Steve Nickolas <usotsuki@buric.co> wrote:

> On Sun, 4 Sep 2022, Paolo Amoroso wrote:
>
> > I'm looking for source code of MS-DOS .COM programs in real-mode 8086
> > Assembly written in NASM syntax. Any repositories or recommendations?
> >
> > I'm learning Assembly programming under MS-DOS (and MikeOS). To avoid
> > the complexity of x86 segmentation, for the time being I prefer to focus
> > on single-segment programs, as I plan to write small programs anyway. So
> > I'd like to study examples of how such systems organize and reference
> > data and code. I searched a bit but found remarkably little .COM code.
>
> I happen to have some in https://github.com/buricco/doslite
>
> -look for the .a86 files.
>

I was going to object that a86 isn't nasm but your chcp.a86 assembled
without error (though I have to say that I dislike numbers as labels)

--
Bah, and indeed Humbug.

Re: Looking for .COM program sources in NASM Assembly

<alpine.DEB.2.21.2209051545510.15708@sd-119843.dedibox.fr>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=650&group=comp.os.msdos.programmer#650

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: usotsuki@buric.co (Steve Nickolas)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Mon, 5 Sep 2022 15:46:27 -0400
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <alpine.DEB.2.21.2209051545510.15708@sd-119843.dedibox.fr>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com> <alpine.DEB.2.21.2209041247100.5131@sd-119843.dedibox.fr> <20220905105449.059e174439713f6ccc4265e3@127.0.0.1>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="8323329-2147281719-1662407188=:15708"
Injection-Info: reader01.eternal-september.org; posting-host="c143792986647d836f7036389ee6e71f";
logging-data="3857207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18O7nVXvamkSm4xKZPQMmmWotZq0j0V9d8="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:l5nTA7NyJ+X0H98do1uooCnu9fo=
In-Reply-To: <20220905105449.059e174439713f6ccc4265e3@127.0.0.1>
X-X-Sender: mary@sd-119843.dedibox.fr
 by: Steve Nickolas - Mon, 5 Sep 2022 19:46 UTC

On Mon, 5 Sep 2022, Kerr-Mudd, John wrote:

> I was going to object that a86 isn't nasm but your chcp.a86 assembled
> without error (though I have to say that I dislike numbers as labels)

NASM doesn't care what extension you give it. ðŸĪŠ

-uso.

Re: Looking for .COM program sources in NASM Assembly

<tf5rnk$p4p$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=651&group=comp.os.msdos.programmer#651

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!+kBJdlD/YMX0GRRXnNvZGQ.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Tue, 6 Sep 2022 00:03:31 +0200
Organization: Aioe.org NNTP Server
Message-ID: <tf5rnk$p4p$1@gioia.aioe.org>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="25753"; posting-host="+kBJdlD/YMX0GRRXnNvZGQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.1
Content-Language: de-DE, en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Herbert Kleebauer - Mon, 5 Sep 2022 22:03 UTC

On 04.09.2022 12:48, Paolo Amoroso wrote:

> I'm looking for source code of MS-DOS .COM programs in real-mode 8086
> Assembly written in NASM syntax. Any repositories or recommendations?

> I'm learning Assembly programming under MS-DOS (and MikeOS). To avoid
> the complexity of x86 segmentation, for the time being I prefer to focus
> on single-segment programs, as I plan to write small programs anyway.
> So I'd like to study examples of how such systems organize and reference
> data and code. I searched a bit but found remarkably little .COM code.

But it doesn't make much sense to write .com programs which can't
be run natively on a current computer system. Windows programs also
don't use segmentation and there in no difference in the assembly code
for DOS and Windows (as long as you use also 32 bit instructions in DOS,
which makes things much easier). The big difference is, that there
is no such simple file format as the .com format in DOS so you will have
to use a linker which generates the proper file structure for a Windows
binary.

But if you really want, you can also generate any byte if the .exe
file by your assembler source code so NASM directly generates the
exe file. Here an example for a simple program which reads from
stdin, converts any lowercase letter to upper case and writes it
to stdout (the code itself starts at the label winmain, the rest
is just the data of the exe file format). Because NASM uses an awful
syntax you have to include "mac.inc" to be able to use a readable
instruction format (I post mac.inc in a follow up):

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; upper.asm: copy stdin to stdout, convert a-z to A-Z ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; nasm -O99 -f bin -o upper.exe upper.asm
%include "mac.inc"

UseIdatSection equ 0 ; 0 if no idat section is used
UseUdatSection equ 0 ; 0 if no udat section is used

;#==================================================================#
;# Start of Headers #
;#==================================================================#

; +--------------------------------------------+
; | Start of DOS Header |
; +--------------------------------------------+

section .text vstart=0

doshead_start:
; DOS .EXE header
dc.b 'MZ' ; Magic number
dc.w dosfilesize % 512 ; Bytes on last page of file (0->512)
dc.w (dosfilesize-1)/512+1
; Pages in file (Page=512 byte)
dc.w 0 ; Relocations (nr of entries)
dc.w doshead_size/16 ; Size of header size in paragraphs (16 byte)
dc.w 0 ; Minimum extra paragraphs needed
dc.w $0ffff ; Maximum extra paragraphs needed
dc.w 0 ; Initial (relative) SS value (ss=load_adr+nr)
dc.w dosstack ; Initial SP value
dc.w 0 ; Checksum
dc.w dosmain ; Initial IP value
dc.w 0 ; Initial (relative) CS value (cs=load_adr+nr)
dc.w reloc ; File address of relocation table
dc.w 0 ; Overlay number
dc.w 0,0,0,0 ; Reserved words
dc.w 0 ; OEM identifier (for e_oeminfo)
dc.w 0 ; OEM information; e_oemid specific
dc.l 0,0,0,0,0 ; Reserved words
dc.l WinHeader ; File address of new exe header
reloc:
doshead_end:
doshead_size equ doshead_end-doshead_start

@@0 equ $-$$ ; current file position

section .text0 vstart=0

dosstart:
dosmain:move.w s6,-[sp]
move.w [sp]+,s0
move.w .text,r1
move.b $09,m0
trap $21
move.w $4c01,r0
trap $21
text: dc.b 'Nice to meet somebody who is still using DOS,',13,10
dc.b 'but this program requires Win32.',13,10,'$'
align 16, db 0

dosstack equ $+256 ; 256 Byte stack
dosfilesize equ $-dosstart+256

; +--------------------------------------------+
; | End of DOS Header |
; +--------------------------------------------+

; +--------------------------------------------+
; | Start of Windows Header |
; +--------------------------------------------+

ImageBase equ $00400000
SectionAlignment equ 4096
FileAlignment equ 512

@@1 equ @@0 + $-$$ ; current file position
WinHeader equ @@1

section .text1 vstart=ImageBase
ImageBase1 equ $
; ImageBase1 has same value as ImageBase but is nonrelatve

; see WINNT.H for information
dc.b 'PE',0,0 ; magic word
; _IMAGE_FILE_HEADER:
dc.w $014c ; Machine ($014c=Intel x86 processor)
dc.w NumberOfSections ; NumberOfSections
dc.l $36a57950 ; TimeDateStamp (seconds since 31.12.69 16:00)
dc.l 0 ; PointerToSymbolTable
dc.l 0 ; NumberOfSymbols
dc.w SizeOfOptionalHeader ; SizeOfOptionalHeader
dc.w $010f ; Charcteristics

; 0x0001 Relocation info stripped from file.
; 0x0002 File is executable (i.e. no unresolved externel references).
; 0x0004 Line nunbers stripped from file.
; 0x0008 Local symbols stripped from file.
; 0x0010 Agressively trim working set
; 0x0080 Bytes of machine word are reversed.
; 0x0100 32 bit word machine.
; 0x0200 Debugging info stripped from file in .DBG file
; 0x0400 If Image is on removable media, copy and run from the swap file.
; 0x0800 If Image is on Net, copy and run from the swap file.
; 0x1000 System File.
; 0x2000 File is a DLL.
; 0x4000 File should only be run on a UP machine
; 0x8000 Bytes of machine word are reversed.

@a1 equ $ ; _IMAGE_OPTIONAL_HEADER
dc.w $010b ; Magic
dc.b 5 ; MajorLinkerVersion
dc.b 12 ; MinorLinkerVersion
dc.l SizeOfCode ; SizeOfCode
dc.l SizeOfInitializedData ; SizeOfInitializedData
dc.l SizeOfUninitializedData ; SizeOfUninitializedData
dc.l winmain-ImageBase ; AddressOfEntryPoint
dc.l BaseOfCode ; BaseOfCode
dc.l BaseOfData ; BaseOfData
dc.l ImageBase ; ImageBase
dc.l SectionAlignment ; SectionAlignment
dc.l FileAlignment ; FileAlignment
dc.w 4 ; MajorOperatingSystemVersion
dc.w 0 ; MinorOperatingSystemVersion
dc.w 0 ; MajorImageVersion
dc.w 0 ; MinorImageVersion
dc.w 4 ; MajorSubsystemVersion
dc.w 0 ; MinorSubsystemVersion
dc.l 0 ; Win32VersionValue
dc.l SizeOfImage ; SizeOfImage
dc.l SizeOfHeaders ; SizeOfHeaders
dc.l 0 ; CheckSum
dc.w 3 ; Subsystem
; 0: Unknown subsystem.
; 1: Image doesn't require a subsystem.
; 2: Image runs in the Windows GUI subsystem.
; 3: Image runs in the Windows character subsystem.
; 5: image runs in the OS/2 character subsystem.
; 7: image run in the Posix character subsystem.
; 8: image run in the 8 subsystem.
dc.w $0000 ; DllCharacteristics
dc.l $00100000 ; SizeOfStackReserve
dc.l $00001000 ; SizeOfStackCommit
dc.l $00100000 ; SizeOfHeapReserve
dc.l $00001000 ; SizeOfHeapCommit
dc.l $00000000 ; LoaderFlags
dc.l NumberOfRvaAndSize ; NumberOfRvaAndSize (entries
; in the data dir)

; ..............................................
; : Start of Image Data Directory :
; ..............................................

; virtual address, size
@b equ $
dc.l 0,0 ; Export Directory
dc.l imp_start,imp_size ; Import Directory
dc.l 0,0 ; Resource Directory
dc.l 0,0 ; Exception Directory
dc.l 0,0 ; Security Directory
dc.l 0,0 ; Base Relocation Table
dc.l 0,0 ; Debug Directory
dc.l 0,0 ; Description String
dc.l 0,0 ; Machine Value (MIPS GP)
dc.l 0,0 ; TLS Directory
dc.l 0,0 ; Load Configuration Directory
dc.l 0,0 ; Bound Import Directory in headers
dc.l iat_start,iat_size ; Import Address Table
dc.l 0,0 ; 14
dc.l 0,0 ; 15
dc.l 0,0 ; 16


Click here to read the complete article
Re: Looking for .COM program sources in NASM Assembly

<tf5rr7$p56$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=652&group=comp.os.msdos.programmer#652

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!+kBJdlD/YMX0GRRXnNvZGQ.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Tue, 6 Sep 2022 00:05:27 +0200
Organization: Aioe.org NNTP Server
Message-ID: <tf5rr7$p56$1@gioia.aioe.org>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
<tf5rnk$p4p$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="25766"; posting-host="+kBJdlD/YMX0GRRXnNvZGQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: de-DE
 by: Herbert Kleebauer - Mon, 5 Sep 2022 22:05 UTC

On 06.09.2022 00:03, Herbert Kleebauer wrote:
> is just the data of the exe file format). Because NASM uses an awful
> syntax you have to include "mac.inc" to be able to use a readable
> instruction format (I post mac.inc in a follow up):
>

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; mac.inc ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro seg 1
%define __seg__ %1
[BITS %1]
%endmacro

seg 16

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro dc.b 1+
db %1
%endmacro

%macro dc.w 1+
dw %1
%endmacro

%macro dc.l 1+
dd %1
%endmacro

%macro blk.b 1
resb %1
%endmacro

%macro blk.b 2
times %1 db %2
%endmacro

%macro blk.w 1
resw %1
%endmacro

%macro blk.l 1
resd %1
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro move.l 2
reg32
%ifidn %2,-[sp]
push dword %1
%elifidn %1,[sp]+
pop dword %2
%elifidn %2,[r6]+-{s1}
%ifidn %1,r0
stosd
%endif
%elifidn %2,[r6.w]+-{s1}
%ifidn %1,r0
stosd
%endif
%elifidn %1,[r5]+-
%ifidn %2,r0
lodsd
%endif
%else
mov dword %2,%1
%endif
reg0
%endmacro

%macro move.w 2
reg16
%ifidn %2,-[sp]
push word %1
%elifidn %1,[sp]+
pop word %2
%elifidn %1,[r5]+-
%ifidn %2,r0
lodsw
%endif
%elifidn %2,[r6.w]+-{s1}
%ifidn %1,r0
stosw
%endif
%else
mov word %2,%1
%endif
reg0
%endmacro

%macro move.b 2
%ifidn %1,[r5]+-
%ifidn %2,[r6]+-{s1}
movsb
%endif
%elifidn %2,[r6.w]+-{s1}
%ifidn %1,r0
stosb
%endif
%else
reg8
mov byte %2,%1
reg0
%endif
%endmacro

%macro moveq.l 2
reg32
%ifidn %2,-[sp]
push dword %1
%endif
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro movu.bw 2
reg16
movzx %2,byte %1
reg0
%endmacro

%macro movu.bl 2
reg32
movzx %2,byte %1
reg0
%endmacro

%macro movu.wl 2
reg32
movzx %2,word %1
reg0
%endmacro

%macro movem.l 2
%if __seg__ = 16
db $66
%endif
%ifidn %2,-[sp]
pusha
%else
popa
nop
%endif
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro exg.l 2
reg32
xchg %2,%1
reg0
%endmacro

%macro exg.w 2
reg16
xchg %2,%1
reg0
%endmacro

%macro exg.b 2
reg8
xchg %1,%2
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro add.l 2
reg32
add %2,%1
reg0
%endmacro

%macro add.w 2
reg16
add word %2,%1
reg0
%endmacro

%macro add.b 2
reg8
add %2,%1
reg0
%endmacro

%macro addq.l 2
reg32
add %2,%1
reg0
%endmacro

%macro addq.w 2
reg16
add word %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro addc.l 2
reg32
adc %2,%1
reg0
%endmacro

%macro addc.w 2
reg16
adc word %2,%1
reg0
%endmacro

%macro addc.b 2
reg8
adc %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro sub.l 2
reg32
sub %2,%1
reg0
%endmacro

%macro sub.w 2
reg16
sub word %2,%1
reg0
%endmacro

%macro sub.b 2
reg8
sub %2,%1
reg0
%endmacro

%macro subq.l 2
reg32
sub %2,%1
reg0
%endmacro

%macro subq.w 2
reg16
sub word %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro subc.l 2
reg32
sbb %2,%1
reg0
%endmacro

%macro subc.w 2
reg16
sbb word %2,%1
reg0
%endmacro

%macro subc.b 2
reg8
sbb %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro cmp.l 2
reg32
cmp %2,long %1
reg0
%endmacro

%macro cmp.w 2
reg16
cmp %2,word %1
reg0
%endmacro

%macro cmp.b 2

%ifidn %1,[r6]+-{s1}
%ifidn %2,[r5]+-
%if __seg__ = 16
db $66
%endif
cmpsb
%endif

%elifidn %1,[r6.l]+-{s1}
%ifidn %2,[r5.l]+-
%if __seg__ = 16
db $66
%endif
cmpsb
%endif

%elifidn %1,[r6.w]+-{s1}
%ifidn %2,[r5.w]+-
%if __seg__ = 32
db $66
%endif
cmpsb
%endif

%else
reg8
cmp %2,byte %1
reg0
%endif
%endmacro

%macro cmpq.l 2
reg32
cmp %2,long %1
reg0
%endmacro

%macro cmpq.w 2
reg16
cmp %2,word %1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro and.l 2
reg32
and %2,%1
reg0
%endmacro

%macro and.w 2
reg16
and %2,%1
reg0
%endmacro

%macro and.b 2
reg8
and %2,%1
reg0
%endmacro

%macro andq.l 2
reg32
and %2,%1
reg0
%endmacro

%macro andq.w 2
reg16
and %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro or.l 2
reg32
or %2,%1
reg0
%endmacro

%macro or.w 2
reg16
or %2,%1
reg0
%endmacro

%macro or.b 2
reg8
or %2,%1
reg0
%endmacro

%macro orq.l 2
reg32
or %2,%1
reg0
%endmacro

%macro orq.w 2
reg16
or %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro eor.l 2
reg32
xor %2,%1
reg0
%endmacro

%macro eor.w 2
reg16
xor %2,%1
reg0
%endmacro

%macro eor.b 2
reg8
xor %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro tst.l 2
reg32
test dword %2,%1
reg0
%endmacro

%macro tst.w 2
reg16
test word %2,%1
reg0
%endmacro

%macro tst.b 2
reg8
test byte %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro lsl.l 2
reg32
shl %2,%1
reg0
%endmacro

%macro lsl.w 2
reg16
shl %2,%1
reg0
%endmacro

%macro lsl.b 2
reg8
shl %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro lsr.l 2
reg32
shr %2,%1
reg0
%endmacro

%macro lsr.w 2
reg16
shr %2,%1
reg0
%endmacro

%macro lsr.b 2
reg8
shr %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro asr.l 2
reg32
sar %2,%1
reg0
%endmacro

%macro asr.w 2
reg16
sar %2,%1
reg0
%endmacro

%macro asr.b 2
reg8
sar %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro rol.l 2
reg32
rol %2,%1
reg0
%endmacro

%macro rol.w 2
reg16
rol %2,%1
reg0
%endmacro

%macro rol.b 2
reg8
rol %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro ror.l 2
reg32
ror %2,%1
reg0
%endmacro

%macro ror.w 2
reg16
ror %2,%1
reg0
%endmacro

%macro ror.b 2
reg8
ror %2,%1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro btst.l 2
reg32
bt dword %2, %1
reg0
%endmacro

%macro bchg.l 2
reg32
btc dword %2, %1
reg0
%endmacro

%macro bset.w 2
%ifidn %1,0
%ifidn %2,sr
stc
%endif
%endif
%endmacro

%macro bclr.w 2
%ifidn %2,sr
%ifidn %1,0
clc
%endif
%ifidn %1,10
cld
%endif
%endif
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro neg.l 1
reg32
neg %1
reg0
%endmacro

%macro neg.w 1
reg16
neg %1
reg0
%endmacro

%macro neg.b 1
reg8
neg %1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro not.l 1
reg32
not %1
reg0
%endmacro

%macro not.w 1
reg16
not %1
reg0
%endmacro

%macro not.b 1
reg8
not %1
reg0
%endmacro

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%macro inc.l 1
reg32
inc dword %1
reg0
%endmacro

%macro inc.w 1
reg16
inc %1
reg0
%endmacro


Click here to read the complete article
Re: Looking for .COM program sources in NASM Assembly

<cdee2818-8fb4-41e9-b81b-d46c76cd7f90n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=653&group=comp.os.msdos.programmer#653

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a37:b943:0:b0:6be:a0a7:60cd with SMTP id j64-20020a37b943000000b006bea0a760cdmr23187128qkf.350.1662447614199;
Tue, 06 Sep 2022 00:00:14 -0700 (PDT)
X-Received: by 2002:a05:6870:a925:b0:124:134c:159a with SMTP id
eq37-20020a056870a92500b00124134c159amr10614058oab.223.1662447613831; Tue, 06
Sep 2022 00:00:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Tue, 6 Sep 2022 00:00:13 -0700 (PDT)
In-Reply-To: <tf5rnk$p4p$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=93.148.128.70; posting-account=uOUOHg4AAADo8AO9B3SI43ekV3AA6lU0
NNTP-Posting-Host: 93.148.128.70
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com> <tf5rnk$p4p$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cdee2818-8fb4-41e9-b81b-d46c76cd7f90n@googlegroups.com>
Subject: Re: Looking for .COM program sources in NASM Assembly
From: paolo.amoroso@gmail.com (Paolo Amoroso)
Injection-Date: Tue, 06 Sep 2022 07:00:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1833
 by: Paolo Amoroso - Tue, 6 Sep 2022 07:00 UTC

On Tuesday, September 6, 2022 at 12:03:36 AM UTC+2, Herbert Kleebauer wrote:
> But it doesn't make much sense to write .com programs which can't
> be run natively on a current computer system. Windows programs also

I actually don't have Windows devices and don't plan to get any. On the desktop I use exclusively chromeOS, here are some notes on my emulation setup based on DOSBox-X as well as my motivations and goals: https://journal.paoloamoroso.com/setting-up-an-ms-dos-emulation-and-development-environment

So MS-DOS and .COM are more than enough for my personal experimentation and fun.

Re: Looking for .COM program sources in NASM Assembly

<20220906100913.95069a0e339b1d9a61d59b4b@127.0.0.1>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=654&group=comp.os.msdos.programmer#654

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: admin@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Tue, 6 Sep 2022 10:09:13 +0100
Organization: Dis
Lines: 14
Message-ID: <20220906100913.95069a0e339b1d9a61d59b4b@127.0.0.1>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
<tf5rnk$p4p$1@gioia.aioe.org>
<tf5rr7$p56$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="f34784251e332ad6ecd3cf1530c98d03";
logging-data="4068487"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1ua0KrzQOsJAp9NKIseDrqxMw5u4jkmE="
Cancel-Lock: sha1:jChiiSMJEmQfnfh286PcnrhcV4w=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
;X-no-Archive: Maybe
GNU: Terry Pratchett
 by: Kerr-Mudd, John - Tue, 6 Sep 2022 09:09 UTC

On Tue, 6 Sep 2022 00:05:27 +0200
Herbert Kleebauer <klee@unibwm.de> wrote:

> On 06.09.2022 00:03, Herbert Kleebauer wrote:
> > is just the data of the exe file format). Because NASM uses an awful
> > syntax you have to include "mac.inc" to be able to use a readable
> > instruction format (I post mac.inc in a follow up):
> >
[lines snipped]

a NASM DOS program to do what you posted would be about (guesses) 50 bytes.
OK I'll post it here. Remind me in a week if I've not done so earlier.
--
Bah, and indeed Humbug.

Re: Looking for .COM program sources in NASM Assembly

<tf9jmt$1o98$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=655&group=comp.os.msdos.programmer#655

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!vSkYYOS96VfZK83+352fcw.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Wed, 7 Sep 2022 10:11:10 +0200
Organization: Aioe.org NNTP Server
Message-ID: <tf9jmt$1o98$1@gioia.aioe.org>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
<tf5rnk$p4p$1@gioia.aioe.org> <tf5rr7$p56$1@gioia.aioe.org>
<20220906100913.95069a0e339b1d9a61d59b4b@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="57640"; posting-host="vSkYYOS96VfZK83+352fcw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.1
Content-Language: de-DE, en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Herbert Kleebauer - Wed, 7 Sep 2022 08:11 UTC

On 06.09.2022 11:09, Kerr-Mudd, John wrote:
> On Tue, 6 Sep 2022 00:05:27 +0200

>> > is just the data of the exe file format). Because NASM uses an awful

> a NASM DOS program to do what you posted would be about (guesses) 50 bytes.
> OK I'll post it here. Remind me in a week if I've not done so earlier.

The code and therefore the size is the same. The CPU doesn't know which OS
is running, it just executes your instructions step by step. The binary
of a Windows executable is much larger than a DOS .com program not because
of a bigger code but because of the file structure and the more complicated
interface to the OS.

Time goes by so slowly, but not so slowly that it still makes sense
to write DOS .com programs. If somebody wants to write assembly code
which can't be executed on current computer systems I would suggest
PDP11 or 68000. In opposite to 16 bit 8086 they have a well designed
processor architecture and there are also emulators available as
for DOS/x86.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░█▀▀▀▀▀█░░▄▀░░▄█▄▄░█▀▀▀▀▀█░░░░
░░░░█░███░█░▀▄░▀░▄▄▀░░█░███░█░░░░
░░░░█░▀▀▀░█░░▀▄▄█▄███░█░▀▀▀░█░░░░
░░░░▀▀▀▀▀▀▀░█░▀▄█▄▀▄█░▀▀▀▀▀▀▀░░░░
░░░░▀▀▀▄▀▀▀█▀▄░▄▄█▄░███░░░▀░▄░░░░
░░░░▀░▀█▄█▀▀█▄█▄██▄░▀▀▄██░▀█▀░░░░
░░░░▀▀█▀▄▀▀█▀▄█░▄█░░█▀█▀░█░▀█░░░░
░░░░▀▄▄▄▄▀▀▀▀▄▄░▀█▀░█▀▀▀▄░▀█▀░░░░
░░░░▀░▀░░░▀▀▄▄▀▄▄▀███▀▀▀██░▄▄░░░░
░░░░█▀▀▀▀▀█░███░█▄███░▀░██░█▀░░░░
░░░░█░███░█░▀░░▄▄▀░░▀▀▀███▄▀░░░░░
░░░░█░▀▀▀░█░█░█░▄█▀▀█▀░░█▄░▄▀░░░░
░░░░▀▀▀▀▀▀▀░▀▀▀▀▀░░▀▀░▀▀░░░▀▀░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Re: Looking for .COM program sources in NASM Assembly

<tf9kv4$acu$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=656&group=comp.os.msdos.programmer#656

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!vSkYYOS96VfZK83+352fcw.user.46.165.242.91.POSTED!not-for-mail
From: klee@unibwm.de (Herbert Kleebauer)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Looking for .COM program sources in NASM Assembly
Date: Wed, 7 Sep 2022 10:32:36 +0200
Organization: Aioe.org NNTP Server
Message-ID: <tf9kv4$acu$1@gioia.aioe.org>
References: <24f4d454-83f3-4c20-878b-f7a303cdffffn@googlegroups.com>
<tf5rnk$p4p$1@gioia.aioe.org>
<cdee2818-8fb4-41e9-b81b-d46c76cd7f90n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="10654"; posting-host="vSkYYOS96VfZK83+352fcw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: de-DE, en-US
 by: Herbert Kleebauer - Wed, 7 Sep 2022 08:32 UTC

On 06.09.2022 09:00, Paolo Amoroso wrote:

> So MS-DOS and .COM are more than enough for my personal experimentation and fun.

But even then you should only use 32 bit instructions. This
allows you to run the code in DOS, Windows and Linux without
modifications. Only the part of the OS interface has to be
different. But for a start it is enough to use only three
OS functions getc(), putc() and exit().

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor