TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Russ Parks
from: Mario Semo
date: 1996-02-01 12:08:00
subject: CSet++ and Asm

Hello Russ,

On Jan 27 12:46 96, Russ Parks of 1:170/200.12 wrote:

 RP> I've come across a problem combining CSet++ 2.0 and 
 RP> assembly language, and hope someone here might be familiar 
 RP> with the idea (already checked C_ECHO).

a) i've not checked your code. i will add a working version. 
b) I'm using MS-MASK 6.0b + VACPP CTC1 CTO1

======== fstcw.asm ======
        .386
        .387
        .MODEL FLAT
        INCLUDELIB OS2386.LIB

CODE32  SEGMENT DWORD USE32 PUBLIC 'CODE'
CODE32  ENDS
DATA32  SEGMENT DWORD USE32 PUBLIC 'DATA'
DATA32  ENDS
CONST32 SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST32 ENDS
BSS32   SEGMENT DWORD USE32 PUBLIC 'BSS'
BSS32   ENDS
DGROUP  GROUP CONST32, BSS32, DATA32
        ASSUME  CS:FLAT, DS:FLAT, SS:FLAT, ES:FLAT
DATA32  SEGMENT
        ttt DW 0
DATA32  ENDS
BSS32   SEGMENT
BSS32   ENDS
CONST32 SEGMENT
CONST32 ENDS
CODE32  SEGMENT

        ALIGN 04H

        PUBLIC  fstcw32
fstcw32 PROC  ; no mangling since _System, :-)
        PUSH    EBP
        MOV     EBP,ESP

        MOV     EAX,[EBP+08H];  Data
        FSTCW   WORD PTR [EAX]
        FSTCW   ttt
        LEAVE
        RET
fstcw32 ENDP
CODE32  ENDS
END
======ftest32.cpp==============
#include 
#include 

extern void _System fstcw32(unsigned short *Data);

main(int argc, char *argv[], char *envp[])
{
 unsigned short data;
 fstcw32(&data);

 printf("%X\n",data);

 printf("CW=%0X\n",_control87(0,0));

 return(0);
}
=========== gen.cmd ============
{at}echo off
call ml /c fstcw.asm
call cc ftest32.cpp fstcw
del *.obj
======================

362
CW=362
 WARPED!, Mario

--- Msgedsq/2 2.2e
* Origin: LC/32 Development Team-Vienna-Austria (2:310/14.11)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 310/14 1 24/999 2/777 396/1 270/101 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™.