1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 03:16:45 +00:00

Some more documentation

This commit is contained in:
Karol Stasiak
2018-01-04 01:15:04 +01:00
parent 1f020e2ced
commit 76122a2dd7
16 changed files with 525 additions and 3 deletions
@@ -110,4 +110,26 @@ class AssemblySuite extends FunSuite with Matchers {
""".stripMargin)(_.readWord(0xc000) should equal(0x100))
}
test("Example from docs") {
EmuBenchmarkRun(
"""
| byte output @$c000
| void main () {
| output = ten()
| }
| const byte fiveConstant = 5
| byte fiveVariable = 5
|
| byte ten() {
| byte result
| asm {
| LDA #fiveConstant
| CLC
| ADC fiveVariable
| STA result
| }
| return result
| }
""".stripMargin)(_.readByte(0xc000) should equal(10))
}
}