Goasm特性


NO.1:

You can address data in memory of any size, but because GoAsm works only in flat mode you can only use 32-bit addresses to do this. So you can't for example, use ADC W[BX],6 or MOV AX,[SI] to address data in memory, you should use ADC W[EBX],6 or MOV AX,[ESI] instead.




NO.2:


More flexibility and great simplification is achieved by not supporting type or parameter checking. See my explanation for this decision.



NO.3:


All labels (except re-usable ones) are assumed to be global and public, ie. they are accessible to other source files (via the linker). This is very simply achieved by using a flag in the object file, yet it avoids the need to declare such labels using for GLOBAL and PUBLIC. Again a great saving in programmer's time and effort! (Re-usable labels used for short code jumps are treated differently).




NO.4


GoAsm provides a very simple way to PUSH a pointer to a null-terminated string for those API calls. Just PUSH it! You can also PUSH a pointer to ordinary raw data.

You can also load pointers to null terminated strings and pointers to raw data into registers in the same way, for example MOV EAX,ADDR 'Hello'


NO.5:

GoAsm provides a flexible and convenient system for code labels. I believe this is extremely important. GoAsm provides a 3-way system permitting unique ("global") labels, locally scoped re-usable labels, and also unscoped re-usable labels.


NO.6:

GoAsm provides a flexible and convenient system for code labels. I believe this is extremely important. GoAsm provides a 3-way system permitting unique ("global") labels, locally scoped re-usable labels, and also unscoped re-usable labels.


NO.7:

"C"-type calls are available using INVOKE


NO.8:

GoAsm allows you to call a function in a static code library and loads the library's code and data directly into the output file at assemble-time more.

Uniquely, GoAsm and the linker GoLink provide a way to CALL a function in another executable directly by ordinal, using the simple syntax eg. CALL MyDll:6. And you can import data pointers without formality


NO.9:

Instructions for PUSH, POP, ARG, INC and DEC can be repeated using comma - more. 
Use of FLAGS as an operand to PUSH, POP and ARG, and in INVOKE and USES - more. 
Automated saving and restoring of registers and flags using the USES statement more. 
To simplify those Windows callback procedures, GoAsm provides automated stack frames using FRAME...ENDF. Sub-routines can share the data held on the stack using USEDATA...ENDU. Local data can be declared dynamically on a message-specific basis - more.



NO.10:

Shortened form of type indicator eg. D instead of DWORD PTR


NO.11:

Instead of using INCBIN you can load blocks of data declared in the source itself using DATABLOCK.



NO.12:

GoAsm is case sensitive in the case of label names and names of definitions. This is not switchable because to allow use of mixed case labels can cause confusion. In every other situation GoAsm is not case sensitive. So for example you can use MOV [ESI],EAX, #INCLUDE, #IF, #DEFINE, STRUCT, DB, or mov [esi],eax, #include, #if, #define, struct, db whichever you prefer.



NO.13:


GoAsm does not support run-time "if" commands. MASM allows you to test conditions and/or repeat instructions in a loop using the .IF/.ELSE/.ELSEIF/.ENDIF and .WHILE/.BREAK commands. These test for conditions at run-time. A386 offers the IF command which tests the flags at run-time. However in MASM the IF/ELSE/ELSEIF/ENDIF/IFDEF series of commands are used for conditional assembly tested at assemble-time. A386 uses the #IF form for this task, while NASM uses %IF. "C" syntax is #IF for compile-time tests. To me, using any syntax for run-time tests which are so similar to established syntax which means something completely different is a recipe for disaster. For the time being I have decided not to support any form of run-time testing or looping. I am willing to reconsider this if anybody can suggest a suitable syntax. For the time being GoAsm users will have to rely on the trusty CMP, TEST, LOOP and conditional jump mnemonics. However GoAsm fully supports conditional assembly at compile-time using the "C"-type #if/#else/#elseif/#endif etc. commands.




NO.14:

GoAsm does not require your program's starting address to have a certain name, like A386. And you do not need to provide a label and then use the END directive to set the starting address (as in MASM). With GoAsm you simply use a label and tell the linker what the label is. Or if you are using GoLink, unless otherwise specified, START is assumed. Also see using GoAsm with various linkers.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值