probably masm 5.10 feature

This commit is contained in:
NishiOwO 2025-04-02 09:21:21 +09:00
parent a5c4ea03cc
commit 7208813af1
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
4 changed files with 16 additions and 7 deletions

View File

@ -91,9 +91,12 @@ static void DoPatch( struct asym *sym, struct fixup *fixup )
* (only at first pass) */
DebugMsg(("DoPatch: Phase error! caused by far call optimization\n"));
ModuleInfo.PhaseError = TRUE;
#if 0
sym->offset++; /* a PUSH CS will be added */
/* todo: insert LABELOPT block here */
OutputByte( 0 ); /* it's pass one, nothing is written */
OutputByte( 0 ); /* it's pass one, nothing is written */
#endif
FreeFixup( fixup );
return;
//} else if( sym->mem_type == MT_NEAR ) {
@ -152,7 +155,7 @@ static void DoPatch( struct asym *sym, struct fixup *fixup )
size++;
/* fall through */
default: /* normal JMP (and PUSH) */
// if( CodeInfo->Ofssize ) /* v1.96: don't use CodeInfo here! */
// if( CodeInfo->Ofssize ) /* v1.96: don't use CodeInfo here!
if( seg->e.seginfo->Ofssize )
size += 2; /* NEAR32 instead of NEAR16 */
size++;

View File

@ -115,7 +115,11 @@ static void FarCallToNear( struct code_info *CodeInfo )
if( Parse_Pass == PASS_2 )
EmitWarn( 4, CALL_FAR_TO_NEAR );
OutputCodeByte( 0x0E ); /* 0x0E is "PUSH CS" opcode */
#if 0
if(IS_CALL(CodeInfo->token) && CodeInfo->mem_type == MT_FAR){
OutputCodeByte( 0x0E ); /* 0x0E is "PUSH CS" opcode */
}
#endif
CodeInfo->mem_type = MT_NEAR;
return;

View File

@ -447,8 +447,8 @@ ret_code GrpDir( int i, struct asm_tok tokenarray[] )
seg->e.seginfo->group != &ModuleInfo.flat_grp->sym &&
seg->e.seginfo->group != &grp->sym ) {
/* segment is in another group */
DebugMsg(("GrpDir: segment >%s< is in group >%s< already\n", name, seg->e.seginfo->group->name));
return( EmitErr( SEGMENT_IN_ANOTHER_GROUP, name ) );
DebugMsg(("GrpDir: segment >%s< is in group >%s< already\n", name, seg->e.seginfo->group->name));
return( EmitErr( SEGMENT_IN_ANOTHER_GROUP, name ) );
}
/* the first segment will define the group's word size */
if( grp->e.grpinfo->seglist == NULL ) {

View File

@ -327,6 +327,7 @@ ret_code ModelSimSegmInit( int model )
/* v2.09: execute always, to make a proper listing if fastpass is off */
//if ( Parse_Pass == PASS_1 ) {
DebugMsg1(("ModelSimSegmInit() enter, pass one\n" ));
#if 0
/* create default code segment (_TEXT) */
SetSimSeg( SIM_CODE, NULL );
EndSimSeg( SIM_CODE );
@ -334,6 +335,7 @@ ret_code ModelSimSegmInit( int model )
/* create default data segment (_DATA) */
SetSimSeg( SIM_DATA, NULL ) ;
EndSimSeg( SIM_DATA );
#endif
/* create DGROUP for BIN/OMF if model isn't FLAT */
if( model != MODEL_FLAT &&
@ -346,8 +348,8 @@ ret_code ModelSimSegmInit( int model )
if( model == MODEL_TINY ) {
strcat( buffer, ", %s" );
AddLineQueueX( buffer, szDgroup, T_GROUP, SegmNames[SIM_CODE], SegmNames[SIM_DATA] );
} else
AddLineQueueX( buffer, szDgroup, T_GROUP, SegmNames[SIM_DATA] );
} else if(!ModuleInfo.m510)
AddLineQueueX( buffer, szDgroup, T_GROUP, SegmNames[SIM_DATA] );
}
DebugMsg1(("ModelSimSegmInit() exit\n" ));
//}