Guest User

Untitled

a guest
Oct 8th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. .name OS
  2. .author "Felix Queißner"
  3. .descr "The main file of the operating system"
  4.  
  5. .export main
  6. .export irq
  7.  
  8. ; PUB main()
  9. main:
  10. pushi 0
  11.  
  12. pusht "Hello World from Conductance!\n"
  13. calln print 1
  14.  
  15. _loop:
  16. load 0
  17. pushi 5
  18. comp_less
  19. jmp_if_not _end
  20.  
  21. load 0
  22. pushi 1
  23. add
  24. store 0
  25.  
  26. pusht "counter: "
  27. load 0
  28. pusht "\n"
  29. calln print 3
  30.  
  31. jmp _loop
  32. _end:
  33. ; Our OS should not go into shutdown mode...
  34. jmp _end
  35. ret
  36.  
  37. ; PUB irq( id : INT32, data : CPUSTATE )
  38. irq:
  39. pusht "Hello IRQ "
  40. load -1
  41. pusht ", EAX="
  42. load -2
  43. readfld eax
  44. pusht "\n"
  45. calln print 5
  46.  
  47. ret
Advertisement
Add Comment
Please, Sign In to add comment