Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. program boxit;
  2.  
  3. #include ("stdlib.hhf");
  4.  
  5. static
  6.  
  7. iDatavalue : int8 := 0 ;
  8.  
  9. Begin boxit;
  10.  
  11. stdout.put("Gimme a decimal value to use as n: ");
  12.  
  13. stdin.get(iDatavalue);
  14.  
  15. mov(iDatavalue, BH);
  16.  
  17. DoWhileLp:
  18.  
  19. DoWhileLpBody:
  20.  
  21. ForLp:
  22.  
  23. InitializeForLp:
  24.  
  25. mov(BH, CH);
  26.  
  27. ForLpTerminationTest:
  28.  
  29. cmp(CH, 0);
  30.  
  31. jnl ForLpDone;
  32.  
  33. ForLpBody:
  34.  
  35. stdout.put("I = ", CH, nl);
  36.  
  37. ForLpIncrement:
  38.  
  39. dec(CH);
  40.  
  41. jmp ForLpTerminationTest;
  42.  
  43. ForLpDone:
  44.  
  45. dec(CH);
  46.  
  47. DoWhileLpTermination:
  48.  
  49. cmp(CH, 0);
  50.  
  51. jbe DoWhileLpDone;
  52.  
  53. jmp DoWhileLpBody;
  54.  
  55. DoWhileLpDone:
  56.  
  57. stdout.puti8(BH);
  58.  
  59. end boxit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement