-
Equates
چهارشنبه 10 دیماه سال 1404 02:11
Equates . RosAsm offers four variants and forms of Equates: User defined Equates. OS Equates. Text Equates. Body Equates. User defined Equates [true 1, false 0, MayBe 00101010101010101] Are user defined equates. Equates cannot be redefined; double declarations are not allowed. They are simple substitutions, for any...
-
Compile-Time Functionalities
چهارشنبه 10 دیماه سال 1404 02:07
Compile-Time Functionalities . Equates Macros_Keys Macros_Basics Inside_Macros Internal_Strings Internal_Counters Conditional_Macros Macros_Examples ParaMacros The Compile-Time Engines are the set of implementations that enables the programmer with defining his own source substitutions. In other words, how to redefine...
-
Structures
چهارشنبه 10 دیماه سال 1404 02:06
Structures .. C-Like Structures Some bad Assemblers have a 'STRUCT' KeyWord performing hidden Declarations and Substitutions. This feature is particularly bad and incompatible with assembly. It has only inconvenience and no advantages. When one writes, with these Assemblers, something like: POINT STRUCT x DWORD ? y...
-
Expressions
چهارشنبه 10 دیماه سال 1404 02:05
Expressions ... The Expressions Parser works with parenthesis, on immediate values, from inside to outside for nested levels. The keys are: + - * / or and xor not shl shr. For integers. Immediate Numbers can be given in Decimal, Hexa or Binary. Examples: mov eax (((654+12) and (00_1010_1010*2)) +3) ; eax = 19 mov eax...
-
Double Negation
چهارشنبه 10 دیماه سال 1404 02:03
Double Negation ... RosAsm can do: 'double negative conditionals'. What's that ? Let us suppose you want some 'DO / Loop_Until' Macro. In order to handle this negative case (we loop until the given condition is NOT true), you would usually have to organize your macro like this: [Do | D0:] [Loop_Until | cmp #1 #3 | j#2...
-
Data alignment
چهارشنبه 10 دیماه سال 1404 02:02
Data alignment .... When the Processor accesses Memory, if the targeted Data are not aligned on their own boundary, it then has to perform 2 Memory accesses instead of one. For beginners, aligned on their own boundary, means that a Word begins on a paired Address. Example: At Address 0600301 >>> Word/dWord...
-
Code Alignment
چهارشنبه 10 دیماه سال 1404 02:01
Code Alignment .... I first didn't think of implementing any Align feature for code as this seemed to me an 'out of purpose' idea. But some other programmers told me that it was an absolute must have in an assembler. So, here it is: align 16 ; (decimal only parameter) >>> inserts the needed number of NOPs to...
-
RosAsm Tables
چهارشنبه 10 دیماه سال 1404 02:01
RosAsm Tables .. When you want to declare several data at once, what other assemblers call DUP is done with '#n' (n can be given either in Decimal, in HexaDecimal or in Win Equate form): [ValuesSet: 1 2 3 4 5 #10 ] ; same as: [ValuesSet: 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1...
-
RosAsm Text
چهارشنبه 10 دیماه سال 1404 01:59
RosAsm Text .. Either ' or '' as delimiter (as you wish, but not mixed): [My_Text: b$ 'One day, One hand, one foot', 0] ; right [My_Text: b$ 'One's day, One's hand, one's foot', 0] ; wrong [My_Text: b$ ''One's day, One's hand, one's foot'', 0] ; right [My_Text: b$ 'She told me ''One day, One hand, one foot'' ', 0] ;...
-
RosAsm Numbers
چهارشنبه 10 دیماه سال 1404 01:56
RosAsm Numbers ... 24 ; this is 24 decimal (no leading zero) 018 ; this is 24 hexadecimal (one leading zero) 0011000 ; this is 24 binary (two leading zeros) equivalent but best: 24 0_18 00_0001_1000 See real number at FPU As RosAsm is intended is to be a true assembler it has of course none of MASM style extended...
-
Len
چهارشنبه 10 دیماه سال 1404 01:55
Len ... The length of a data set is given by LEN reserved word: There are two different LENs: Win32 Structures according. Example: [HeadLen: len value1: 0 value2:W$ 0 value3: B$ 0] D$HeadLen = 11 (not 7) because in Win 32 Structures, 'SizeOf' is part of the data. Free use. Example: [data1_2_3: 1 2 3 Words_data: W$ 1 2...
-
Virtual Data
چهارشنبه 10 دیماه سال 1404 01:52
Virtual Data .. '?' sign is reserved for Virtual Uninitialized Data declarations: [MyData: ? #500] Will declare 500 uninitialized dWords that will not appear as as many zeros inside the dead file and, that is, will save disk space . You cannot mix Uninitialized data and Initialized data inside the same Brackets set....
-
Data Access
چهارشنبه 10 دیماه سال 1404 01:52
Data Access .... Simplified access to label and data (reformed syntax): When you want to declare data, you first declare a label (any non reserved word followed by a colon. When you want to access the value at a label you give the size marker. Two signs are available: '§' (paragraph) and '$' (dollar); (B$, W$, D$,Q$...
-
Data Management
چهارشنبه 10 دیماه سال 1404 01:51
-
Jumps Sizes
چهارشنبه 10 دیماه سال 1404 01:50
Jumps Sizes . The Jumps in a Code Section can be either long (four Bytes) or short (one Byte) signed Displacements. The RosAsm Assembler does not optimize the Jumps Sizes. That is, if you declare a long jmp where it could as well be short, it will remain long. This optimization that some Assemblers do, has no effect...
-
Local Labels
چهارشنبه 10 دیماه سال 1404 01:49
Local Labels ... Note for the Tree View feature: if you use plain labels inside your routines, tree view will not give you a very good image of your source structure (each plain label is considered by tree view as a routine entry point). If you do not want 'meaningless' labels in your sources, use HLL-style macros (IF...
-
Plain vs Local Labels
چهارشنبه 10 دیماه سال 1404 01:49
Plain vs Local Labels ... From the point of view of encoded jumps sizes, RosAsm is a MonoPass Assembler. This means that the Encoder does not perform any kind of computation or optimization for short or long sizes of any jmp Instruction. For example, in a MultiPasses Assembler, if a jump can be short, and that the...
-
Local symbols
چهارشنبه 10 دیماه سال 1404 01:48
Local symbols .... Local symbols are available for Data Labels, Equates names and Code Labels. They begin with a leading ''@''. When encountering, for example ''@Var'', RosAsm replaces this symbol by: 'PreviousPlainLabel@Var': [MainDataLabel: @Var1: 12 @Var2: 66] ; Data ... ; No plain Label between !!!!!!! mov eax...
-
DB Pseudo-Instruction
چهارشنبه 10 دیماه سال 1404 01:47
DB Pseudo-Instruction .... A DB instruction is available to declare Code bytes 'by hand'. This may be useful for: Experiments on coding. Coding by hand possibly missing or wrong encoding in the future. Useful for Disassembler when holding weird code ( cryptic Code, Data in Code,...) To reserve room in code for...
-
DLLs
چهارشنبه 10 دیماه سال 1404 01:47
DLLs ... To declare a Label as an Exported Function, all you have to do is to set an ending double colon to the Label name: MyDllFunction:: In RosAsm menu, [File] / [Output] options will open first a multi-purpose Dialog that allows the user to define the usual values for PEs: Stack and Heap Min and Max sizes and to...
-
§_or_$
چهارشنبه 10 دیماه سال 1404 01:46
§_or_$ .... RosAsm notations never assume any typing (just like NASM). So you have to always specify some markers. Many older programmers, who are accustomed to MASM, do not like this at all, and consider it as an added pain to have to regularly specify the size, the type, and so on... They usually prefer declaring a...
-
Win32 specifics
چهارشنبه 10 دیماه سال 1404 01:36
Win32 specifics .. Api calls In most other languages, api calls are done using 2 instructions (a CALL to a JMP instruction) because of problems bound to linker use (languages can't know where linkers will store the import table). RosAsm does it in one single instruction (CALL 'mem'). The syntax is, for example: call...
-
RosAsm Specifics
چهارشنبه 10 دیماه سال 1404 01:35
RosAsm Specifics .. Multi instructions lines mov eax ebx | mov ecx 0 | call My_Routine ; ' | ' and 'CR/LF' are equivalent Multi lines instructions My_Macro_Evocation, ; this is a macro evocation with 3 parameters: AAA1, ; First one BBB2, ; Second one CCC3 ; Third one ; commas mean 'not over...' All source text that is...
-
Syntax flexibility
چهارشنبه 10 دیماه سال 1404 01:27
Syntax flexibility .... RosAsm not only works on multi-instruction lines and multi-line instructions but it gives some new features for source text organization: Comma sign ',' doesn't mean anything but 'Not over...' in multi line instructions and 'not one word' before signed numbers. So, it makes it possible to use...
-
Naming
چهارشنبه 10 دیماه سال 1404 01:26
Naming .... RosAsm algorithms for Equates and Macros replacements use the Byte high bit as a flag. So you can't use for symbols namings ASCII Characters higher than 127. In Practice: 'a' > 'Z'. There is no error check for this. RosAsm is case insensitive. (Case sensitive Api calls are 'Text'). Out of Mnemonics and...
-
The Clip File
چهارشنبه 10 دیماه سال 1404 01:26
The Clip File ... The default Name of this File is 'Clip.txt', but you can name it whatever you like and specify it in the Configuration Tab. Organization The File is to be structured as a simple two level tree. The main level (Groups) is defined by lines like: //Asm Snippets //CallBacks //Macros The Sub-Level...
-
Clip
چهارشنبه 10 دیماه سال 1404 01:24
Clip .... The [Clip] Menu option opens a Dialog for Sources Templates. Select a Template with the two List Boxes, click on the[OK] button: The Template is copied to the ClipBoard, ready to be pasted in your source. In the right part of the Dialog, two flags can be set for Data on/off and for Local/Global symbols. In...
-
The Reusing Choice
چهارشنبه 10 دیماه سال 1404 01:24
The Reusing Choice ... Each Assembler comes with its implied 'programming philosophy' and the one of RosAsm is in some way being a 'Specific Assembler': It is Specific in a way that it outputs only one type of file (I think its better having a tool doing properly only one thing than doing many things but, even if...
-
Reusing Code
چهارشنبه 10 دیماه سال 1404 01:23
Reusing Code . Reusing_Choice The_Clip_Feature Clip_File Other features may be considered of interest for Sources reuse. See also the TITLE feature, in the Source_Editor chapter, and the IncIncluder_Parser Chapter. ~~~~~~~
-
Unused Symbols Scanner
چهارشنبه 10 دیماه سال 1404 01:21