-
Notifications
You must be signed in to change notification settings - Fork 0
Code Examples
This is an index of the examples provided with the library.
There is no real order to reading them, but top-to-bottom would be a reasonable way to read through them.
Very simple example of a loop contrasting a loop written in standard assembly format, and the same loop written using the structured commands.
Another example, using the structured loop commands, but also advancing the idea of making assembly a little higher level than standard assembly.
The previous examples used zero-terminated strings, while this example uses a size-prefixed string to carry out the same task and demonstrates a structured loop embedded within a structured if.
Just to fill out the set, printing strings properly. Doesn't actually demonstrate any loops.
Demonstrates a simple check of the fire button on joystick port 2 using the if_key_down statement - holding the button will cycle the screen colour from white, through the greys and into black, then in reverse back to white again.
This is pretty much the same code as simple_fire_down.asm, except it uses the if_key_pressed statement to demonstrate the one-shot behaviour of 'pressed' vs 'down'.
This example provides a full breakdown of the joystick state of port 2.
It covers all of the machinery to read joystick port 2, plus every one of the if_key_down, if_key_up, if_key_pressed, if_key_not_pressed, if_key_released and if_key_not_released tests.
This is a duplicate of joystick/full_joystick_state.asm, except that it uses SPACE & the WASD keys