Fixed a typo and changed example to use new asm syntax
git-svn-id: svn://svn.cc65.org/cc65/trunk@3112 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -497,7 +497,11 @@ This cc65 version has some extensions to the ISO C standard.
|
|||||||
sequences of assembler code. For example, the macro
|
sequences of assembler code. For example, the macro
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
#define hi(x) (__AX__=(x),asm("\ttxa\n\tldx\t#$00",__AX__)
|
#define hi(x) \
|
||||||
|
(__AX__ = (x), \
|
||||||
|
asm ("txa"), \
|
||||||
|
asm ("ldx #$00"), \
|
||||||
|
__AX__)
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
will give the high byte of any unsigned value.
|
will give the high byte of any unsigned value.
|
||||||
|
|||||||
Reference in New Issue
Block a user