Started reading a book: Peter Abel. Assembler and programming for the IBM PC .

It says that you need to insert a floppy disk with an assembler package, on which there are two versions of the assembler - Asm.exe and Masm.exe . Also says about linker LINK .

I use VirtualBox with FreeDos . Where to get these assemblers and linker?

I would like to use the syntax and actions that are listed in the book. For example, it is necessary to assemble and link the following program.

CODESG SEGMENT PARA 'CODE' BEGIN PROC FAR ASSUME CS:CODESG,DS:DATASG,SS:STACKG PUSH DS SUB AX,AX PUSH AX MOV AX,DATASG MOV DS,AX RET BEGIN ENDP CODESG ENDS END BEGIN 

Tried to assemble using JWASM . Displays the following errors:

Program code

Attempt to assemble using _JWASM_

1 answer 1

We try to compile the source using masm32:

 ml /c test.asm 

We get the result:

 Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All rights reserved. Assembling: test.asm test1742.asm(3) : error A2006: undefined symbol : DATASG test1742.asm(3) : error A2006: undefined symbol : STACKG test1742.asm(7) : error A2006: undefined symbol : DATASG 

Those. The problem is not JWasm. The reason is that the code contains the names of the sections that you do not have in the code. You need to either replace these names with the name of the section that you have in the code ( CODESEG ), or add the necessary sections to the code:

 CODESG SEGMENT PARA 'CODE' BEGIN PROC FAR ASSUME CS:CODESG,DS:DATASG,SS:STACKG PUSH DS SUB AX,AX PUSH AX MOV AX,DATASG MOV DS,AX RET BEGIN ENDP CODESG ENDS DATASG SEGMENT DATASG ENDS STACKG SEGMENT STACK db 256 dup (?) STACKG ENDS END BEGIN 

I collect using masm32 (from Windows):

 ml /c test.asm link16 test.obj,test.exe,nul,nul,nul 

Result:

 Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All rights reserved. Assembling: test.asm Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994 Copyright (C) Microsoft Corp 1984-1993. All rights reserved. 

Under DOSBox, the resulting executable file is launched and successfully completed without outputting anything)