# Examples
The examples showcased here are designed to compile with a compiler built from the newest sources.
If you are using a release version of the compiler, consider browsing the older versions of the examples:
* [for version 0.3.28](https://github.com/KarolS/millfork/tree/v0.3.28/examples)
* [for version 0.3.26](https://github.com/KarolS/millfork/tree/v0.3.26/examples)
* [for version 0.3.24](https://github.com/KarolS/millfork/tree/v0.3.24/examples)
* [for version 0.3.22](https://github.com/KarolS/millfork/tree/v0.3.22/examples)
* [for version 0.3.18](https://github.com/KarolS/millfork/tree/v0.3.18/examples)
* [for version 0.3.16](https://github.com/KarolS/millfork/tree/v0.3.16/examples)
* [for version 0.3.14](https://github.com/KarolS/millfork/tree/v0.3.14/examples)
* [for version 0.3.12](https://github.com/KarolS/millfork/tree/v0.3.12/examples)
* [for version 0.3.10](https://github.com/KarolS/millfork/tree/v0.3.10/examples)
## Cross-platform examples
* [Hello world](crossplatform/hello_world.mfk) (C64/C16/PET/VIC-20/Atari/Apple II/BBC Micro/ZX Spectrum/PC-88/Armstrad CPC/MSX/Z1013) – simple text output
* [Fizzbuzz](crossplatform/fizzbuzz.mfk) (C64/C16/PET/VIC-20/PET/Atari/Apple II/BBC Micro/ZX Spectrum/PC-88/Armstrad CPC/MSX/X16) – everyone's favourite programming task
* [Fizzbuzz 2](crossplatform/fizzbuzz2.mfk) (C64/C16/PET/VIC-20/PET/Atari/Apple II/BBC Micro/ZX Spectrum/PC-88/Armstrad CPC/MSX/CoCo) – an alternative, more extensible implementation of fizzbuzz
* [Fizzbuzz JP](crossplatform/fizzbuzz_jp.mfk) (PC-88/Japanese C64) – Fizzbuzz, but in Japanese
* [Text encodings](crossplatform/text_encodings.mfk) (C64/ZX Spectrum) – examples of text encoding features
* [Echo](crossplatform/echo.mfk) (C64/C16/VIC-20/Apple II/ZX Spectrum/PC-88/MSX)– simple text input and output
* [Calculator](crossplatform/calculator.mfk) (C64/C16/VIC-20/Apple II/ZX Spectrum/PC-88/MSX/TRS-80) – simple numeric input and output
* [Guessing game](crossplatform/guess.mfk) (C64/C16/VIC-20/Apple II/ZX Spectrum/PC-88/MSX/TRS-80/Z1013) – a guess-a-number game
* [Fire effect](crossplatform/fire.mfk) (C64/C16/ZX Spectrum) – a simple fire effect
* [`readkey` test](crossplatform/readkeytest.mfk) (C64/C16/PET/VIC-20/Atari/Apple II/Armstrad CPC/ZX Spectrum/PC-88/TRS-80/Z1013) – keyboard reading test
* [Screen encoding test](crossplatform/screnctest.mfk) (C64/C16) – default-to-screen encoding conversion test
* [Bell](crossplatform/bell.mfk) (Apple II/ZX Spectrum) – a program that goes \*ding!\*
* [Life](crossplatform/life.mfk) (C64/C16/Atari/ZX Spectrum) – Conway's game of life
* [Reg dump](crossplatform/regdump.mfk) (C64/C16/ZX Spectrum/CoCo) – a program that simply prints the initial values of CPU registers
* [Test suite](tests) (C64/C16/Atari/Apple II/BBC Micro/Armstrad CPC/ZX Spectrum/PC-88/CoCo) – the semi-official test-suite for Millfork
## Commodore 64 examples
### Graphical examples
* [Rasterbar](c64/rasterbar.mfk) – simple rasterbar effect
* [Softscrolling](c64/softscroll.mfk) – soft-scrolling a single line of text
* [Galencia starfield](c64/galencia.mfk) – a port of the starfield effect from the game *Galencia*
* [Space Poker \[external link\]](https://github.com/KarolS/spacepoker) – a game made for the 2018 Reset C64 Craptastic 4KB Game Competition
### Other examples
* Multifile ([source code](c64/multifile.mfk), [platform definition](c64/multifile.ini)) –
how to create a program made of multiple files loaded on demand
* [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
* [MMC4 example](nes/nestest_mmc4.mfk) – the same thing as above, but uses a MMC4 mapper just to test bankswitching
* [Pong example](nes/pong.mfk) – simple pong example based off pong1.asm by bunnyboy of the nintendoage.com forums
## Atari Lynx examples
* [Lynx demo example](atari_lynx/atari_lynx_demo.mfk) – a simple sprite demo
## Atari 8-bit examples
### Hardware specific examples
* [System Off example](a8/systemoff_example.mfk) – programming with ROM off
* [DLI example](a8/dli_example.mfk) – simple display list and display list interrupt example
* [Horizontal scroll example](a8/endless_scroll.mfk) – simple horizontal scroll example
* [Vertical scroll example](a8/vertical_scroll.mfk) – simple vertical scroll example
* [Horizontal stars example](a8/horizontal_stars.mfk) – horizontal stars done on one missile
### Music
* [CMC Player](a8/cmcplayer.mfk) – CMC player with sample music
* [MPT Player](a8/mptplayer.mfk) – MPT player with sample music
### Benchmarks
* [Grand Theft Antic](a8/grand_theft_antic.mfk) – ANTIC impact on CPU depending on the used graphic mode
* [GR.8 Chessboard Benchmark](a8/gr8_chessboard_benchmark.mfk) – chessboard drawing benchmark in GR.8
* [FOR Countdown Benchmark](a8/countdown_for_benchmark.mfk) – countdown from 1,999,999 to 0 (FOR loop)
* [WHILE Countdown Benchmark](a8/countdown_while_benchmark.mfk) – countdown from 1,999,999 to 0 (WHILE loop)
* [Sieve of Eratosthenes (1899) Benchmark](a8/sieve1899.mfk) – sieve of Eratosthenes, 1899 primes algorithm
* [Monte Carlo PI approximation Benchmark](a8/montecarlo_pi_benchmark.mfk) – measures the efficiency of multiplication
* [Bubble Sort Benchmark](a8/bubble_sort.mfk) – sort 255 elements
### Other examples
* [Test OS module](a8/a8_os_test.mfk) – quick test for a8_os.mfk module
* [Rainbow example](a8/rainbow.mfk) – simple scrolling rasterbars
* [Quatari Landscape](a8/landscape.mfk) – part of Quatari 256B intro
## Game Boy examples
* [GB test example](gb/gbtest.mfk) – a partial port of the NES example, with a rudimentary experimental text output implementation
## Atari 2600 examples
* [Colors](vcs/colors.mfk) – simple static rasterbars
## MSX examples
* [Encoding test](msx/encoding_test.mfk) – text encoding test; displays three lines of text in three different languages,
no more one of which will display correctly depending on the default font of your computer.
## Commander X16 examples
* [Palette](x16/palette.mfk) – displays the default 256-colour palette.
* [Balls](x16/balls.mfk) – 16 sprites using 240 colours.
* [Joy demo](x16/joydemo.mfk) – simple joystick demo.
没有合适的资源?快使用搜索试试~ 我知道了~
Millfork:针对基于6502和Z80的微型计算机和家用控.zip
共755个文件
scala:315个
mfk:166个
tbl:130个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 80 浏览量
2023-04-05
13:10:33
上传
评论
收藏 1.16MB ZIP 举报
温馨提示
Millfork:针对基于6502和Z80的微型计算机和家用控.zip
资源推荐
资源详情
资源评论
收起资源包目录
Millfork:针对基于6502和Z80的微型计算机和家用控.zip (755个子文件)
binarydata 18B
tiles.chr 8KB
echo.cmc 3KB
.gitignore 592B
c64_ef_small.ini 3KB
nes_mmc4.ini 2KB
x16_experimental.ini 1KB
c64.ini 1KB
a8.ini 1KB
multifile.ini 973B
nes_small.ini 913B
c64_crt16k.ini 884B
c64_crt8k.ini 878B
c64jp.ini 759B
c64_scpu16.ini 665B
vcs.ini 608B
bbcmicro.ini 587B
vic20_a000.ini 582B
c64_scpu.ini 546B
coco_crt.ini 542B
lunix.ini 525B
gb_small.ini 521B
msx_crt.ini 519B
coco_rsdos.ini 505B
zxspectrum_8080.ini 487B
z1013.ini 477B
trs80m3cmd.ini 459B
trs80m1cmd.ini 459B
zxspectrum.ini 459B
pet.ini 453B
pc88.ini 451B
c128.ini 448B
plus4.ini 442B
c16.ini 440B
atari_lynx.ini 433B
vic20_8k.ini 428B
vic20.ini 427B
vic20_3k.ini 426B
cpc464.ini 379B
cpm_z80.ini 377B
apple2.ini 376B
cpm.ini 356B
dos_com.ini 352B
CPURAM.java 2KB
orig.cpu.js 115KB
cpu.js 114KB
reflect-config.json 1KB
resource-config.json 22B
LICENSE 34KB
LICENSE 847B
CHANGELOG.md 22KB
syntax.md 16KB
command-line.md 14KB
custom-platform.md 13KB
text.md 12KB
types.md 12KB
operators.md 11KB
literals.md 11KB
assemblyz80.md 10KB
preprocessor.md 9KB
assembly.md 8KB
README.md 6KB
assembly6809.md 5KB
x16.md 5KB
functions.md 4KB
calling-convention.md 4KB
target-platforms.md 4KB
inlining.md 4KB
variable-storage.md 4KB
encconv.md 4KB
modules.md 4KB
optimization.md 4KB
faq.md 4KB
x86disclaimer.md 4KB
nes.md 4KB
reentrancy.md 3KB
apple2.md 3KB
hints.md 3KB
cdiff.md 3KB
string.md 3KB
frequent.md 3KB
doc_index.md 3KB
keywords.md 3KB
famicom-programming-guide.md 3KB
README.md 3KB
undefined-behaviour.md 3KB
commodore-programming-guide.md 2KB
rom-vs-ram.md 2KB
undocumented.md 2KB
README.md 2KB
custom-encoding.md 2KB
COMPILING.md 2KB
cbm_file.md 2KB
suffixes.md 2KB
generated-labels.md 2KB
getting-started.md 2KB
CONTRIBUTING.md 2KB
preprocessor_cbm.md 1KB
stdlib.md 1KB
predefined_constants.md 1KB
共 755 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功