What's New
I have added the keyword "_CALL_STACK_ADDR_SZ_", which allows calculating the address of the on-stack function parameters after/above the on-stack return address of a function call. It will allow us to use a portable value to skip a 2, 4 or 8-byte return address automatically without modifying the stack frame code of the function in any other way.
I have also added an "align 16" directive near the end of the source file. In this way we can include this file at any point of the program without the need to write a jump label because it already includes one to avoid accidentally executing the code inside "00000000__x86_Portable.asm".
Source Code File:
http://www.archefire.org/_PROJECTS_/x86_Portable/v2017-04-14/src/00000000__x86_Portable.asm
Text Recording (to see how the file has been typed/developed over time):
http:///www.archefire.org/_PROJECTS_/x86_Portable/v2017-04-14/SourceDoc/src/00000000__x86_Portable.asm.html
Current Keywords:
Code: Select all
Automatic size selection for data/variables:
-------------------------------------------------------------------------
wideword -- Automatic size selection, 2, 4 or 8 bytes.
ww -- Automatic size selection, define wideword, 2, 4 or 8 bytes.
wideword_SZ -- Automatic size selection, 2, 4 or 8.
Automatic size selection for any on-stack call return addresses:
-------------------------------------------------------------------------
_CALL_STACK_ADDR_SZ_ -- 2, 4 or 8.
Automatic size selection for CPU registers:
-------------------------------------------------------------------------
wideax -- 2, 4 or 8 bytes.
widebx -- 2, 4 or 8 bytes.
widecx -- 2, 4 or 8 bytes.
widedx -- 2, 4 or 8 bytes.
widesi -- 2, 4 or 8 bytes.
widedi -- 2, 4 or 8 bytes.
widesp -- 2, 4 or 8 bytes.
widebp -- 2, 4 or 8 bytes.
Automatic size selection for "Address" and "Operand" prefixes:
-------------------------------------------------------------------------
awide -- a16, a32 or nothing.
owide -- a16, a32 or nothing.
Automatic size selection for CPU instructions:
-------------------------------------------------------------------------
cmpswide -- 2, 4 or 8 bytes.
lodswide -- 2, 4 or 8 bytes.
stoswide -- 2, 4 or 8 bytes.
movswide -- 2, 4 or 8 bytes.
inswide -- 2 or 4 bytes.
outswide -- 2 or 4 bytes.
Automatic variable or register selection for 64-bit CPU r8-r9 registers:
-------------------------------------------------------------------------
_r8 -- 2, 4 or 8 bytes.
_r9 -- 2, 4 or 8 bytes.
_r10 -- 2, 4 or 8 bytes.
_r11 -- 2, 4 or 8 bytes.
_r12 -- 2, 4 or 8 bytes.
_r13 -- 2, 4 or 8 bytes.
_r14 -- 2, 4 or 8 bytes.
_r15 -- 2, 4 or 8 bytes.