Skip to content
Permalink
Browse files

switch -D, -I and -Fi

failed used with -I"quoted text"
  • Loading branch information
nidud committed Jan 15, 2017
1 parent 7c81438 commit 5471d03bbfced345c50b95dcecb1e6957fe18a95
Showing with 38 additions and 3 deletions.
  1. BIN bin/asmc.exe
  2. +15 −0 source/asmc/history.txt
  3. +19 −3 source/asmc/src/asmc.asm
  4. +2 −0 source/asmc/src/h/asmc.inc
  5. +2 −0 source/asmc/src/h/globals.h
BIN +0 Bytes (100%) bin/asmc.exe
Binary file not shown.
@@ -3,7 +3,22 @@ Change Log File for ASMC
========================

Changes in 2.22 - xx xxx 2017
- fixed bug in switch -D, -I and -Fi used with -I"quoted text"
- disabled asmc-added HLL directives when switch /Xc used
same as:
option nokeyword:<.switch>
option nokeyword:<.case>
option nokeyword:<.endc>
option nokeyword:<.default>
option nokeyword:<.endsw>
option nokeyword:<.ifb>
option nokeyword:<.ifw>
option nokeyword:<.ifd>
option nokeyword:<.assert>
option nokeyword:<.assertb>
option nokeyword:<.assertw>
option nokeyword:<.assertd>
Note: OPTION ASMC:OFF do not disable these keywords
- fixed bug in .WHILE (eax || edx) && ecx
- fixed bug in .WHILE !(eax || edx) && ecx

@@ -201,24 +201,40 @@ GetNumber ENDP
; queue a text macro, include path or "forced" include files.
; this is called for cmdline options -D, -I and -Fi

queue_item PROC i, string
strlen( string )
queue_item PROC USES esi i, string

mov esi,string
.while BYTE PTR [esi] == '"'

.if strrchr( strcpy( esi, addr [esi+1] ), '"' )

mov BYTE PTR [eax],0
.endif
.endw

strlen( esi )
add eax,sizeof( qitem )
MemAlloc( eax )
mov [eax].qitem.next,0
mov edx,eax
strcpy( addr [edx].qitem.value, string )
strcpy( addr [edx].qitem.value, esi )

mov eax,i
mov ecx,Options.queues[eax*4]
.if ecx

.while [ecx].qitem.next

mov ecx,[ecx].qitem.next
.endw
mov [ecx].qitem.next,edx
.else

mov Options.queues[eax*4],edx
.endif

ret

queue_item ENDP

get_fname PROC USES esi edi ebx i, string
@@ -946,6 +946,7 @@ c_stack_frame db ? ; -Cs option
hll_switch db ? ; -sw[c|p|a|t|nt] option
loopalign db ? ; OPTION:LOOPALIGN setting
casealign db ? ; OPTION:CASEALIGN setting
wstring db ? ; -ws
global_options ENDS

M_MODULEVARS MACRO
@@ -1073,6 +1074,7 @@ hll_switch db ? ; -sw[c|p|a|t|nt] option
loopalign db ? ; OPTION:LOOPALIGN setting
casealign db ? ; OPTION:CASEALIGN setting
assert_proc dd ? ; .assert:<proc/macro name>
wstring db ? ; OPTION WSTRING:[ON|OFF]
module_info ENDS

equ_item STRUC
@@ -393,6 +393,7 @@ unsigned char c_stack_frame; /* -Cs option */
unsigned char hll_switch; /* -sw[c|p|a|t|nt] option */
unsigned char loopalign; /* OPTION:LOOPALIGN setting */
unsigned char casealign; /* OPTION:CASEALIGN setting */
unsigned char wstring; /* -ws */
};

/* if the structure changes, option.c, SetMZ() might need adjustment! */
@@ -542,6 +543,7 @@ struct module_info {
unsigned char loopalign; /* OPTION:LOOPALIGN setting */
unsigned char casealign; /* OPTION:CASEALIGN setting */
char * assert_proc; /* .assert:<handler> */
unsigned char wstring; /* -ws OPTION WSTRING:[ON|OFF] */
};

#define CurrSource ModuleInfo.currsource

0 comments on commit 5471d03

Please sign in to comment.
You can’t perform that action at this time.