Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #425 > unrolled thread
| Started by | cferris@freeRemoveuk.com.invalid |
|---|---|
| First post | 2011-06-13 15:15 +0100 |
| Last post | 2011-06-18 21:53 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.sys.acorn.programmer
IF THEN ELSE in ObjAsm cferris@freeRemoveuk.com.invalid - 2011-06-13 15:15 +0100
Re: IF THEN ELSE in ObjAsm Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-06-13 20:47 +0200
Re: IF THEN ELSE in ObjAsm Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-14 11:46 +0200
Re: IF THEN ELSE in ObjAsm cferris@freeRemoveuk.com.invalid - 2011-06-18 21:53 +0100
| From | cferris@freeRemoveuk.com.invalid |
|---|---|
| Date | 2011-06-13 15:15 +0100 |
| Subject | IF THEN ELSE in ObjAsm |
| Message-ID | <5e26bce251.cferris@cferris.freeuk.com> |
Hi
What is the IF THEN ELSE ENDIF syntax for the Acorn 'ObjAsm'?
Been trying something like :-
*********
Debug_01 * TRUE
AREA |Asm$$Code|, CODE, READONLY
.. ;main code
[ Debug_01 = FALSE ;if
.. ;Code
| ;else
.. ;Different Code
] ;endif
Thanks
--
Colin Ferris Cornwall UK
[toc] | [next] | [standalone]
| From | Rick Murray <heyrickmail-usenet@yahoo.co.uk> |
|---|---|
| Date | 2011-06-13 20:47 +0200 |
| Message-ID | <4df65b4b$0$14661$ba4acef3@reader.news.orange.fr> |
| In reply to | #425 |
On 13/06/2011 16:15, cferris@freeRemoveuk.com.invalid wrote:
> What is the IF THEN ELSE ENDIF syntax for the Acorn 'ObjAsm'?
> Been trying something like :-
> [ Debug_01 = FALSE ;if
...
> | ;else
...
> ] ;endif
Yup, that looks correct, except TRUE is {TRUE} and FALSE is {FALSE}...
Pick up a copy of the guide from:
http://foundation.riscos.com/Private/manuals/Toolbox/Asm.pdf
Best wishes,
Rick.
[toc] | [prev] | [next] | [standalone]
| From | Martin Wuerthner <spamtrap@mw-software.com> |
|---|---|
| Date | 2011-06-14 11:46 +0200 |
| Message-ID | <f16427e351.martin@bach.planiverse.com> |
| In reply to | #425 |
In message <5e26bce251.cferris@cferris.freeuk.com>
cferris@freeRemoveuk.com.invalid wrote:
> What is the IF THEN ELSE ENDIF syntax for the Acorn 'ObjAsm'?
> Been trying something like :-
> *********
> Debug_01 * TRUE
> AREA |Asm$$Code|, CODE, READONLY
> .. ;main code
>
> [ Debug_01 = FALSE ;if
> .. ;Code
> | ;else
> .. ;Different Code
> ] ;endif
You would normally do it like that:
GBLL Debug_01
Debug_01 SETL {TRUE}
[ Debug_01
... code for Debug_01 = TRUE ...
|
... code for Debug_01 = FALSE ...
]
There is no need to test for {TRUE} or {FALSE} explicitly, just use
the boolean label itself as the condition.
--
Martin
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | cferris@freeRemoveuk.com.invalid |
|---|---|
| Date | 2011-06-18 21:53 +0100 |
| Message-ID | <77c373e551.cferris@cferris.freeuk.com> |
| In reply to | #429 |
In message <f16427e351.martin@bach.planiverse.com>
Martin Wuerthner <spamtrap@mw-software.com> wrote:
> In message <5e26bce251.cferris@cferris.freeuk.com>
> cferris@freeRemoveuk.com.invalid wrote:
>
[snip]
>
> You would normally do it like that:
>
> GBLL Debug_01
> Debug_01 SETL {TRUE}
>
Thanks Martin - it was the above that I was getting wrong.
--
Colin Ferris Cornwall UK
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web