Advertisement
Runer112

Perfect(ish) grayscale in Axe

Aug 9th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. Here's a skeleton structure that should allow a crystal timer interrupt suitable for grayscale display. For controlling the interrupy delay, I'd recommend simply storing it in a variable and, whenever it's changed, call SetD() with that new value.
  2.  
  3. I can't guarantee that this works, but I hope it does. It may require the latest version of Axe (1.2.1).
  4.  
  5.  
  6. Setup code:
  7. - make sure the calculator is not an 83+ first with Normal!
  8. ----------------------------------------
  9. <initial delay>:SetD() .recommended: ~180
  10. Asm(3E40D330)
  11. fnInt(Int,)
  12.  
  13.  
  14. Teardown code:
  15. ----------------------------------------
  16. Asm(AFD330)
  17. LnRegʳ
  18.  
  19.  
  20. Interrupt code:
  21. ----------------------------------------
  22. Lbl Int
  23. Asm(3E08D3033E02D331DB32D332)
  24. DispGraphʳʳ
  25. .perhaps more code
  26. Return
  27.  
  28.  
  29. Routine to set the interrupt delay:
  30. - input: 8-bit unsigned integer
  31. - bad stuff will happen if this is too low
  32. - recommended: enforce range to ~150-255
  33. ----------------------------------------
  34. Lbl SetD
  35. Asm(7DD332)
  36. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement