mirror of
https://github.com/irmen/prog8.git
synced 2024-10-17 10:24:55 +00:00
doc fix
This commit is contained in:
parent
0146a39ebb
commit
58854ef45b
@ -320,7 +320,14 @@ Initial values across multiple runs of the program
|
|||||||
|
|
||||||
When declaring values with an initial value, this value will be set into the variable each time
|
When declaring values with an initial value, this value will be set into the variable each time
|
||||||
the program reaches the declaration again. This can be in loops, multiple subroutine calls,
|
the program reaches the declaration again. This can be in loops, multiple subroutine calls,
|
||||||
or even multiple invocations of the entire program.
|
or even multiple invocations of the entire program. If you omit an initial value, it will
|
||||||
|
be set to zero only for the first run of the program. A second run will utilize the last value
|
||||||
|
where it left off (but your code will be a bit smaller because no initialization instructions
|
||||||
|
are generated)
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
this behavior may change in a future version so that subsequent runs always
|
||||||
|
use the same initial values
|
||||||
|
|
||||||
This only works for simple types, *and not for string variables and arrays*.
|
This only works for simple types, *and not for string variables and arrays*.
|
||||||
It is assumed these are left unchanged by the program.
|
It is assumed these are left unchanged by the program.
|
||||||
|
@ -2,15 +2,6 @@
|
|||||||
TODO
|
TODO
|
||||||
====
|
====
|
||||||
|
|
||||||
|
|
||||||
### Macros
|
|
||||||
|
|
||||||
@todo macros are meta-code that is executed by the compiler, in a preprecessing step
|
|
||||||
during the compilation, and can produce output that is then replaced on that point in the input source.
|
|
||||||
Allows us to create pre calculated sine tables and such.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Memory Block Operations
|
Memory Block Operations
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
@ -26,6 +17,7 @@ Memory Block Operations
|
|||||||
|
|
||||||
these should call (or emit inline) optimized pieces of assembly code, so they run as fast as possible
|
these should call (or emit inline) optimized pieces of assembly code, so they run as fast as possible
|
||||||
|
|
||||||
|
At least we have memcopy() already and some screen related routines in asm
|
||||||
|
|
||||||
|
|
||||||
Bitmap Definition (for Sprites and Characters)
|
Bitmap Definition (for Sprites and Characters)
|
||||||
@ -36,4 +28,33 @@ to define CHARACTERS (8x8 monochrome or 4x8 multicolor = 8 bytes)
|
|||||||
|
|
||||||
and SPRITES (24x21 monochrome or 12x21 multicolor = 63 bytes)
|
and SPRITES (24x21 monochrome or 12x21 multicolor = 63 bytes)
|
||||||
--> PLACE in memory on correct address (base+sprite pointer, 64-byte aligned)
|
--> PLACE in memory on correct address (base+sprite pointer, 64-byte aligned)
|
||||||
|
--> actually not needed because a block at the correct address, and an array using 3x21 binary values, more or less does exactly this already::
|
||||||
|
|
||||||
|
~ spritedata $0a00 {
|
||||||
|
; this memory block contains the sprite data
|
||||||
|
; it must start on an address aligned to 64 bytes.
|
||||||
|
%option force_output ; make sure the data in this block appears in the resulting program
|
||||||
|
|
||||||
|
ubyte[63] balloonsprite = [ %00000000,%01111111,%00000000,
|
||||||
|
%00000001,%11111111,%11000000,
|
||||||
|
%00000011,%11111111,%11100000,
|
||||||
|
%00000011,%11100011,%11100000,
|
||||||
|
%00000111,%11011100,%11110000,
|
||||||
|
%00000111,%11011101,%11110000,
|
||||||
|
%00000111,%11011100,%11110000,
|
||||||
|
%00000011,%11100011,%11100000,
|
||||||
|
%00000011,%11111111,%11100000,
|
||||||
|
%00000011,%11111111,%11100000,
|
||||||
|
%00000010,%11111111,%10100000,
|
||||||
|
%00000001,%01111111,%01000000,
|
||||||
|
%00000001,%00111110,%01000000,
|
||||||
|
%00000000,%10011100,%10000000,
|
||||||
|
%00000000,%10011100,%10000000,
|
||||||
|
%00000000,%01001001,%00000000,
|
||||||
|
%00000000,%01001001,%00000000,
|
||||||
|
%00000000,%00111110,%00000000,
|
||||||
|
%00000000,%00111110,%00000000,
|
||||||
|
%00000000,%00111110,%00000000,
|
||||||
|
%00000000,%00011100,%00000000 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user