Created
July 8, 2019 06:48
-
-
Save hthmkhlf/f90d394a22371bd0235298516b53be6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program boxit; | |
#include ("stdlib.hhf"); | |
static | |
iDatavalue : int8 := 0 ; | |
Begin boxit; | |
stdout.put("Gimme a decimal value to use as n: "); | |
stdin.get(iDatavalue); | |
mov(iDatavalue, BH); | |
DoWhileLp: | |
DoWhileLpBody: | |
ForLp: | |
InitializeForLp: | |
mov(BH, CH); | |
ForLpTerminationTest: | |
cmp(CH, 0); | |
jnl ForLpDone; | |
ForLpBody: | |
stdout.put("I = ", CH, nl); | |
ForLpIncrement: | |
dec(CH); | |
jmp ForLpTerminationTest; | |
ForLpDone: | |
dec(CH); | |
DoWhileLpTermination: | |
cmp(CH, 0); | |
jbe DoWhileLpDone; | |
jmp DoWhileLpBody; | |
DoWhileLpDone: | |
stdout.puti8(BH); | |
end boxit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment