flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > english language macros possiblity |
Author |
|
Tomasz Grysztar 11 Nov 2005, 02:03
Code: macro xor [params] { common match dest =with src, params \{ xor dest,src \} } macro move [params] { common match src =into dest, params \{ mov dest,src \} } xor eax with eax move 20 into eax |
|||
11 Nov 2005, 02:03 |
|
shism2 11 Nov 2005, 03:21
WOW fasm is extremely powerful...
Also with numbers... How can you set numbers like 20 to automatically 20h move 20 into eax becomes mov eax,14 Btw do you think this is useful Thomas? |
|||
11 Nov 2005, 03:21 |
|
comrade 11 Nov 2005, 05:43
This is extemely useful. I predict every asm programmer will adapt that style
|
|||
11 Nov 2005, 05:43 |
|
shism2 11 Nov 2005, 05:47
Really???? or are you just being sarcastic?
|
|||
11 Nov 2005, 05:47 |
|
shism2 11 Nov 2005, 06:48
SysInvoke NTTerminateProcess, -1,0,2
The -1 and 0 are the parameters and the 2 is the number of parameters macro SysInvoke proc,[parameters,numbers] ; indirectly call STDCALL procedure { local blah1,blah2 push eax reverse pushd parameters jmp blah2 blah1: mov eax, proc mov edx, esp dw 340Fh ;sysenter 0F34h blah2: call blah1 add esp, (numbers*4) + 4 ; + 1 dummy EIP } What am I missing? |
|||
11 Nov 2005, 06:48 |
|
vid 11 Nov 2005, 09:19
comrade wrote: This is extemely useful. I predict every asm programmer will adapt that style just like RSA-encrypting part of source. But it is nice example for how easily can you solve complex problem with fasm macros. |
|||
11 Nov 2005, 09:19 |
|
Tomasz Grysztar 11 Nov 2005, 12:38
shism2 wrote: Btw do you think this is useful Thomas? Useful? No, I think it's just a form of amusement. As vid once said, writing fasm macros is on a good way to become a kind of wicked humor. |
|||
11 Nov 2005, 12:38 |
|
vid 14 Nov 2005, 15:55
if i am right, someone here was using fasm macros to create HTML code. And don't forget about BMP drawing interface created with macros.
How about some FASM macro humor thread? |
|||
14 Nov 2005, 15:55 |
|
revolution 15 Nov 2005, 02:09
It all seems too verbose for my tastes
Code: move address of PlainTextString into register EAX please move a value equal to the length of PlainTextString into register ECX please save current instruction pointer and jump to subroutine PrintString please exit this program please declare a subroutine with the name PrintString please place register EAX onto the stack please place register ECX onto the stack please save current EIP and jump to subroutine APIScreenPrint please return to the caller of this subroutine please declare a text string with the handle PlainTextString and put the following text there: "Hello world!" please Thank you and goodbye |
|||
15 Nov 2005, 02:09 |
|
shism2 15 Nov 2005, 03:41
What with all the please???
I really don't think it would be that bad...... I don't get why it's funny to you guys . It looks alot easier than normal asm to me ..... Look at the advantages : 1. You already know the english language 2. Easier to understand 3. Gain better typing skills ONLY 2 disadvantages : 1.Alot more typing 2. Fasm program would take more time to compile ... I'm guessing Last edited by shism2 on 15 Nov 2005, 06:22; edited 1 time in total |
|||
15 Nov 2005, 03:41 |
|
revolution 15 Nov 2005, 05:50
Quote: What with all the please??? Quote: You already know the english language Quote: I really don't think it would be that bad |
|||
15 Nov 2005, 05:50 |
|
shism2 15 Nov 2005, 06:21
Well, I only see this being of any use to beginners... Because almost everyone here already has adapted to normal asm... I might try and code some of the macros and post a macro include file here..
|
|||
15 Nov 2005, 06:21 |
|
revolution 15 Nov 2005, 06:36
I think it would be great if I could talk to my computer like this:
Computer: "Ta da, here it is, have fun with your new Rolls Royce." |
|||
15 Nov 2005, 06:36 |
|
shism2 15 Nov 2005, 21:56
LOL
|
|||
15 Nov 2005, 21:56 |
|
Slai 12 Mar 2006, 03:01
"move 20 into eax" doesnt seem really practical, but for example
eax=20 seems easyer than mov eax,20 .. and an IF statement instead of cmp xxx,xx ; je xxx |
|||
12 Mar 2006, 03:01 |
|
eVAPor8 04 Nov 2006, 10:35
hmmm.... just my personal opinion on the "let's make asm english" idea...
...Why not simply take up COBOL/VB6/any other HLL? ASM is complex. It would not have is power, size and speed otherwise. Yeah It's hard to get into (believe me I know this! I'm a noob) BUT think about what you're doing. You are almost directly controlling the voltages within wires in the CPU (and other chips) that are microscopic and bending the overall machine to your will. This is "powerful magic" and needs to learnt with patience, and one step at a time, IMHO. Also, I don't speak Russian/Eastern European languages... How about the devel's work on a "Russian" language? How can I interpret the source? The whole point of ASM is that we are talking "directly" to the chip. Once I've learned to do this, I'll be able to "converse" with any other programmer, and language barriers will be removed since we ALL use the same terms. As I understand it, Flat Assembly is supposed to be just that. And it's a massive achievement. If you want to create a new programming language yourself, well, go ahead. Post the fora when you've finished. Oh, and BTW, don't forget that Americans don't actually speak English. They spell "colour" "color", (because it's easier) They use "fawcetts" instead of "taps" (*cough* easier?), and I was like really not enjoying when I wrote this. To an American that last paragraph would make perfect sence and compile correctly. To an Englishman, It's a load of gibberish and fail immediately (pun intended). Oh, and BTW, sorry for the rant, as a noob, I should probably stay quiet. Anyway, all the best, eVAP |
|||
04 Nov 2006, 10:35 |
|
llaurrentt 04 Nov 2006, 10:53
comrade wrote: This is extemely useful. I predict every asm programmer will adapt that style Just keep in mind that I will not! Asm is asm just like C is not pascal!!! Would you agree with someone asking this kind of thing just because they feel better (read 'it will less introduce change in their life'): Code: #define BEGIN { #define END } int foo( int arg ) BEGIN return arg*2; END I shall not forbid anyone to (ab)use of this non-sense but for my life I shall not agree with them! Be an asm programmer or be someting else! |
|||
04 Nov 2006, 10:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.