TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: David Noon
from: George White
date: 1996-06-07 19:11:16
subject: Force close a MDOS sessi

Hi David,

You wrote to Mike Bilow:

DN>MB> However, you have
DN>MB> an endian bug here, since the image equivalent of "DB 
02h,0FDh" is
DN>MB> correctly "DW 0FD02h".

DN>My copy of MASM doesn't reverse bytes when coding in hex. Neither did
DN>BCAF 3.1, which uses TASM.

DN>I converted these instructions into a clone of EXIT_VDM.COM. I attach
DN>an assembly listing of this instruction sequence from MASM 6.11. The
DN>DW in question is at location 0103.

DN>Perhaps Microsoft, Borland and I are all wrong.

Only your interpretation of the listing :-(.

DN>==================================================================

DN>Microsoft (R) Macro Assembler Version 6.11                06/06/96
DN>23:17:29 EXIT_VMB.ASM              Page 1 - 1


DN>                                ; Cobbled version of
DN>EXIT_VDM.COM, called EXIT_VMB.COM
DN>                                    .MODEL   TINY
DN> 0000                               .CODE
DN>                                    .STARTUP
DN> 0100                          *{at}Startup:
DN> 0100   3   33 C0                    XOR     AX,AX
DN> 0102   2   F4                       HLT
DN> 0103  02FD                          DW      02FDH

Here is your problem. The fact that both Borland and MIcrosoft display
it as a word rather than as a pair of bytes is causing the problem of
interpretation (the Borland TASM 3.1 .LST file format is similar to the
MASM one)

DN>                                    .EXIT
DN> 0105   4   B4 4C              *     mov   ah, 04Ch
DN> 0107  51   CD 21              *     int   021h
DN>                                     END

DN>================================================================

Using the source above (temp.asm) assembled with TASM from BC 3.1 I get:

Turbo Dump  Version 3.1 Copyright (c) 1988, 1992 Borland International
                     Display of File TEMP.OBJ

000000 THEADR  temp.ASM

 extranious details to save some bandwdth.

0000A1 LEDATA  Segment: _TEXT          Offset: 0100  Length: 000D
    0000: 33 C0 F4 FD 02 B4 4C CD  21 B4 4C CD 21            3.....L.!.L.!
...................^^^^^
0000B5 MODEND(Main Module)   Frame: GI[1]   Target: SI[1], 0100h

Linked to a .com using "tlink /t temp temp" I see.

Turbo Dump  Version 3.1 Copyright (c) 1988, 1992 Borland International
                     Display of File TEMP.COM

000000: 33 C0 F4 FD 02 B4 4C CD  21 B4 4C CD 21 00 00 00 3.....L.!.L.!...
.................^^^^^

For reference the dump of exit_vdm.com is:

Turbo Dump  Version 3.1 Copyright (c) 1988, 1992 Borland International
                   Display of File EXIT_VDM.COM

000000: 33 C0 F4 02 FD CD 20 00  00 00 00 00 00 00 00 00 3..... .........
.................^^^^^

qed.

George

 * SLMR 2.1a * What do you mean? You actually read this tagline!!!

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 517 628 713/888 800/1
@PATH: 440/4 141/209 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.