From 1ea539ddea39ff5d0d37e777ddd67c97098bddeb Mon Sep 17 00:00:00 2001 From: nilspolek Date: Tue, 23 Jan 2024 15:49:05 +0100 Subject: [PATCH] removed the fib program --- fib.asm | 177 ------------------------------------------- fib.bin?inline=false | Bin 472 -> 0 bytes 2 files changed, 177 deletions(-) delete mode 100644 fib.asm delete mode 100644 fib.bin?inline=false diff --git a/fib.asm b/fib.asm deleted file mode 100644 index ca2f81f..0000000 --- a/fib.asm +++ /dev/null @@ -1,177 +0,0 @@ -// -// version -// - .vers 6 - -// -// execution framework -// -__start: - call _main - call _exit -__stop: - jmp __stop - -// -// Integer readInteger() -// -_readInteger: - asf 0 - rdint - popr - rsf - ret - -// -// void writeInteger(Integer) -// -_writeInteger: - asf 0 - pushl -3 - wrint - rsf - ret - -// -// Character readCharacter() -// -_readCharacter: - asf 0 - rdchr - popr - rsf - ret - -// -// void writeCharacter(Character) -// -_writeCharacter: - asf 0 - pushl -3 - wrchr - rsf - ret - -// -// Integer char2int(Character) -// -_char2int: - asf 0 - pushl -3 - popr - rsf - ret - -// -// Character int2char(Integer) -// -_int2char: - asf 0 - pushl -3 - popr - rsf - ret - -// -// void exit() -// -_exit: - asf 0 - halt - rsf - ret - -// -// void main() -// -_main: - asf 2 - call _readInteger - pushr - popl 0 - pushl 0 - call _fib - drop 1 - pushr - popl 1 - pushl 0 - call _writeInteger - drop 1 - pushc 10 - call _writeCharacter - drop 1 - pushc 102 - call _writeCharacter - drop 1 - pushc 105 - call _writeCharacter - drop 1 - pushc 98 - call _writeCharacter - drop 1 - pushc 58 - call _writeCharacter - drop 1 - pushc 32 - call _writeCharacter - drop 1 - pushl 1 - call _writeInteger - drop 1 - pushc 10 - call _writeCharacter - drop 1 -__0: - rsf - ret - -// -// Integer fib(Integer) -// -_fib: - asf 4 - pushc 0 - popl 0 - pushc 1 - popl 1 - pushc 0 - popl 2 - pushc 1 - popl 3 - pushl -3 - pushc 2 - lt - brf __2 - pushc 1 - popr - jmp __1 - jmp __3 -__2: - jmp __5 -__4: - pushl 0 - pushl 1 - add - popl 2 - pushl 1 - popl 0 - pushl 2 - popl 1 - pushl 3 - pushc 1 - add - popl 3 -__5: - pushl 3 - pushl -3 - lt - brt __4 -__6: - pushl 2 - popr - jmp __1 -__3: -__1: - rsf - ret - diff --git a/fib.bin?inline=false b/fib.bin?inline=false deleted file mode 100644 index da3fc0235f2231c85aab7aba9426e100bf03d837..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 472 zcmZvYy$-@K41}G6_>)Q^I`Ch?z)LVPFo47pz`}sUhIoHez6%+G)JRvKowIZG<#agq z%r!uYY>1x zlRLAOYQ$K>P^|Hwn7B_9sIF~@Vz|B_2n uUCn0F!Rr_M74W1zdy3j=k$S}gT=l>lMfDY$sXXnmx|z+T<1Wr5MsHusRv@eZ