TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Paul Edwards
date: 1994-12-31 22:24:18
subject: good.asm

.386
	ifndef	??version
?debug	macro
	endm
	endif
	?debug	S "prob.c"
	?debug	T "prob.c"
_TEXT	segment dword public use32 'CODE'
_TEXT	ends
_DATA	segment dword public use32 'DATA'
_DATA	ends
_BSS	segment dword public use32 'BSS'
_BSS	ends
	.model	FLAT
	assume	cs: FLAT, ds: FLAT, ss: FLAT, es: FLAT
_TEXT	segment dword public use32 'CODE'
c{at}	label	byte
_main	proc	near
   ;	
   ;	int main(void)
   ;	
{at}6{at}17:
	ENTER	0,0
	PUSH	EBX
   ;	
   ;	{
   ;	    struct mystruct __far16 *a;
   ;	
   ;	    a = func();
   ;	
	CALL	near ptr _func
   ;	
   ;	    printf("x is %d\n", a->x);
   ;	
	MOV	EDX,offset FLAT:s{at}
	MOV	EBX,EAX
	OR	EBX,EBX
	JE	short {at}9
	ROR	EBX,16
	SHR	BX,3
	ROL	EBX,16
{at}9:
	PUSH	dword ptr [EBX]
	PUSH	EDX
	CALL	near ptr _printf
	ADD	ESP,8
   ;	
   ;	    return (0);
   ;	
	XOR	EAX,EAX
{at}10{at}0:
	POP	EBX
	POP	EBP
	RET
{at}11{at}0:
_main	endp
_TEXT	ends
	?debug	D "E:\BCO100\INCLUDE\_null.h" 6740 2048
	?debug	D "E:\BCO100\INCLUDE\_nfile.h" 6740 2048
	?debug	D "E:\BCO100\INCLUDE\_defs.h" 6740 2048
	?debug	D "E:\BCO100\INCLUDE\stdio.h" 6740 2048
	?debug	D "prob.c" 7583 43957
_s{at}	equ	s{at}
	extrn	_printf:near
	extrn	_func:near
	public	_main
_DATA	segment dword public use32 'DATA'
d{at}	label	byte
d{at}w	label	word
d{at}d	label	dword
s{at}	label	byte
	db	"x is %d",10,0
_DATA	ends
_BSS	segment dword public use32 'BSS'
b{at}	label	byte
b{at}w	label	word
b{at}d	label	dword
_BSS	ends
	end
@EOT:

--- Mksmsg
* Origin: none (3:711/934.9)

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™.