1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-06-11 15:29:34 +00:00

Updated examples

This commit is contained in:
Karol Stasiak 2018-12-19 22:32:55 +01:00
parent e13e744167
commit 10492bc534
6 changed files with 41 additions and 15 deletions

View File

@ -21,13 +21,19 @@ Available for: all computer targets.
Reads a line from the console and returns a pointer to a null-terminated string.
The string is valid only until next read from the console.
Available for: Commodore 64 with `c64_basic` module.
Available for:
ZX Spectrum,
Commodore 64 with `c64_basic` module,
Commodore 16 or Plus/4 with `c264_basic`.
#### `word readword()`
Reads a 16-bit unsigned integer from the console.
Available for: Commodore 64 with `c64_basic` module.
Available for:
ZX Spectrum,
Commodore 64 with `c64_basic` module,
Commodore 16 or Plus/4 with `c264_basic`.
#### `void bell()`

View File

@ -2,22 +2,18 @@
## Cross-platform examples
* [Hello world](hello_world/hello_world.mfk) (C64/C16/PET/VIC-20/Atari/Apple II/BBC Micro/PC-88/Armstrad CPC) simple text output
* [Hello world](crossplatform/hello_world.mfk) (C64/C16/PET/VIC-20/Atari/Apple II/BBC Micro/ZX Spectrum/PC-88/Armstrad CPC) simple text output
* [Text encodings](c64/text_encodings.mfk) (C64/ZX Spectrum) examples of text encoding features
* [Text encodings](crossplatform/text_encodings.mfk) (C64/ZX Spectrum) examples of text encoding features
* [Bell](apple2/bell.mfk) (Apple II/ZX Spectrum) a program that goes \*ding!\*
* [Echo](crossplatform/echo.mfk) (C64/C16/ZX Spectrum) simple text input and output
* [Calculator](crossplatform/calculator.mfk) (C64/C16/ZX Spectrum) simple numeric input and output
* [Bell](crossplatform/bell.mfk) (Apple II/ZX Spectrum) a program that goes \*ding!\*
## Commodore 64 examples
### Console I/O examples
* [Echo](c64/echo.mfk) simple text input and output
* [Calculator](c64/calculator.mfk) simple numeric input and output
* [Panic](c64/panic_test.mfk) how panic works on C64, showing the address of where it happened
### Graphical examples
* [Rasterbar](c64/rasterbar.mfk) simple rasterbar effect
@ -26,6 +22,10 @@
* [Galencia starfield](c64/galencia.mfk) a port of the starfield effect from the game *Galencia*
### Other examples
* [Panic](c64/panic_test.mfk) how panic works on C64, showing the address of where it happened
## Famicom/NES examples
* [NES 101 tutorial example](nes/nestest.mfk) a port of the tutorial example from the NES 101 tutorial by Michael Martin

View File

@ -1,5 +1,14 @@
import stdio
import c64_basic
#if CBM_64
import c64_basic
#elseif CBM_264
import c264_basic
#elseif ZX_SPECTRUM
// no imports needed
#else
#error Unsupported platform
#endif
void main() {
word a

View File

@ -1,5 +1,16 @@
import c64_basic
#if CBM_64
import c64_basic
#elseif CBM_264
import c264_basic
#elseif ZX_SPECTRUM
// no imports needed
#else
#error Unsupported platform
#endif
import stdio
void main() {
while true {
readline()