From 3350c34a74844e21ea69077e01efff3bae64bdcd Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 23 Mar 2021 17:31:08 -0700 Subject: . --- html/mu-init-test.subx.html | 98 --------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 html/mu-init-test.subx.html (limited to 'html/mu-init-test.subx.html') diff --git a/html/mu-init-test.subx.html b/html/mu-init-test.subx.html deleted file mode 100644 index 182869fb..00000000 --- a/html/mu-init-test.subx.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -Mu - mu-init-test.subx - - - - - - - - - - -https://github.com/akkartik/mu/blob/main/mu-init-test.subx -
- 1 # Just a test stub for mu-init.subx
- 2 #
- 3 # Try it out like this:
- 4 #   $ ./translate_subx init.linux [0-9]*.subx mu-init.subx mu-init-test.subx
- 5 #   $ ./a.elf  # should run all tests
- 6 
- 7 main:  # args: (addr array (addr array byte)) -> result/ebx: int
- 8     # . prologue
- 9     55/push-ebp
-10     89/<- %ebp 4/r32/esp
-11     # . save registers
-12     50/push-eax
-13     56/push-esi
-14     # esi = args
-15     8b/-> *(ebp+8) 6/r32/esi
-16     {
-17       # if (argc <= 1) break
-18       81 7/subop/compare *esi 4/imm32
-19       7e/jump-if-<= break/disp8
-20       # if (argv[1] != "test") break
-21       (string-equal? *(esi+8) "test")  # => eax
-22       3d/compare-eax-and 0/imm32
-23       74/jump-if-= break/disp8
-24       #
-25       (run-tests)
-26       # return *Num-test-failures
-27       8b/-> *Num-test-failures 3/r32/ebx
-28       eb/jump $main:end/disp8
-29     }
-30 $main:end:
-31     # . restore registers
-32     5e/pop-to-esi
-33     58/pop-to-eax
-34     # . epilogue
-35     89/<- %esp 5/r32/ebp
-36     5d/pop-to-ebp
-37     c3/return
-
- - - -- cgit 1.4.1-2-gfad0