flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly 29 Jan 2008, 03:00
define is a preprocessor directive and has similar (but not equal) behaviour than equ.
For example this works Code: define food "Hello World!", 13, 10 display food But what you did however was defining an empty define so the assembler recieves "if defined" instead of "if defined food" as you would expect. "defined" can work only with expressions and expression can have numbers, symbols and operations and it returns true only when the expression can be resolved (it is valid things like "if defined 5", and that will always be defined since the expression has just a constant result). Things like this are possible Code: if defined alpha + beta display "The sum can be done!", 13, 10 else if ~(defined alpha | defined beta) display "Both symbols are undefined!", 13, 10 else if ~defined alpha display "Alpha is undefined!" else display "Beta is undefined!" end if end if alpha = 3 rb 9 beta: |
|||
![]() |
|
AlexP 29 Jan 2008, 21:08
Thanks, it works! (thought "defined" returned true even if it was only defined)
|
|||
![]() |
|
LocoDelAssembly 29 Jan 2008, 21:20
Perhaps you confused it with "if eq" that returns true? Even "if food eq food" would worked since the assembler would recieved "if eq" and returns true because both parts are empty
![]() |
|||
![]() |
|
AlexP 29 Jan 2008, 22:18
Everything's working, but (tryin' to judge it's speed), can anyone find a link to cycle counts?? I've searched google for everything possible but I can't find one... I thought I saw one in these forums, but I don't know where
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.