| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | ASM in OS/2 |
Hi,
There is a file called SKEL32.ZIP on the Hobbes CD and Internet site,
that shows how to use TASM to create 32bit OS/2 executables. You'll need
TASM (My Version is 3.1 that came with BORLAND C++ 3.1) and you'll need
the OS/2 toolkit ver 2.1 .
Here is some code to try ....
(SNIP ON THE DASHED LINES!)
------8<----OS2TASM.BAT---------------------------------8<-----------
c:\BORLANDC\bin\TASM /OI %1.ASM,,%1 >%1.ERR
------8<--end of OS2TASM.BAT----------------------------8<-----------
------8<----OS2TASML.CMD--------------------------------8<-----------
OS2TASM %1
IF NOT ERRORLEVEL 1 GOTO LINK
TYPE %1.ERR
GOTO END
:LINK
C:\OS2\LINK386 %1,,NUL,C:\Toolkt21\os2lib\os2386.lib,%1.DEF
:END
------8<--end of OS2TASML.CMD---------------------------8<-----------
------8<----------HELLO.DEF-----------------------------8<-----------
NAME HELLO WINDOWCOMPAT
PROTMODE
STACKSIZE 8192
------8<--end of HELLO.DEF------------------------------8<-----------
------8<----------HELLO.ASM-----------------------------8<-----------
;**************************************************
;* hello.asm *
;* Public Domain R.Gambrill 1995 *
;* modeled after Skelos32.asm by B.Magaletta 1992 *
;**************************************************
IDEAL
P386
MODEL OS2 USE32 FLAT
LARGESTACK
STACK 8192H
extrn syscall Dos32Write:near
extrn syscall Dos32Beep:near
;---------
;| DATA |
;---------
DATASEG
Msg1 DB 'Hello World, This is the future. It's called OS/2!'
DB 13,10
Msg1A = $-Msg1
count dd 0
ENDS
;----------------
;| MAIN PROGRAM |
;----------------
CODESEG
HELLO:
CALL Dos32Write syscall,\
1,\ stdout handle
OFFSET Msg1,\ ->buffer
Msg1A,\ buffer length
OFFSET count ;->returned length
CALL Dos32Beep syscall,\
100,\
100
RET
ENDS
END HELLO
--------8<-- End of HELLO.ASM-------------------------8<---------------
.... Just type "OS2TASML hello" when you have these files cut out!
You may have to modify OS2TASM.BAT to reflect the location of TASM on
your system.
I just found the original SKELOS32 file the other day, I mostly work
in C, and I am *very* new to OS/2, so I'm afraid I can't be of much more
help today. But this shows that it can be done!
BTW, The SKELOS32.ASM can be had via internet ftp on hobbes.mnsu.edu
in /os2/dev32/skel32.zip I got the OS2 2.1 toolkit on a promo copy of
the DevCon CD that came with Dr. Dobbs developer update newsletter.
The toolkit is also included on the IBM C++ first step CD.
Good Luck!,
Robert Gambrill gambrill{at}interstate.net
Kansas City, Missouri, U.S.A.
Voice Phone #s Work (816)753-2002 Home (816)756-1137
--- Maximus/2 2.02
* Origin: The Haven BBS (1:280/45)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 280/45 1 270/101 105/103 42 712/515 711/808 809 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™.