Advertisement
tyler569

LUA WORKS

Oct 19th, 2019
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. vmm: protecting kernel code and rodata
  2. 0xffffffff80106100 - 0xffffffff80118000
  3. terminal: initialized
  4. rand: initialized 'random' generator
  5. idt: interrupts installed
  6. pic: remapped and masked
  7. pit: running tickless
  8. uart: listening for interrupts
  9. kbrd: listening for interrupts
  10. mb: parsing multiboot at 0xffffffff8034a800
  11. mb: unknown tag type 21 encountered
  12. mb: kernel command line: init=init
  13. mb: bootloader name: GRUB 2.02+dfsg1-12ubuntu2
  14. mb: unknown tag type 10 encountered
  15. mb: initfs at 0xffffffff8014a000
  16. mb: elf headers loaded
  17. mb: unknown tag type 4 encountered
  18. mb: unknown tag type 5 encountered
  19. mb: unknown tag type 8 encountered
  20. mmap: 0: 9fc00 type 1
  21. mmap: 9fc00: 400 type 2
  22. mmap: f0000: 10000 type 2
  23. mmap: 100000: fee0000 type 1
  24. mmap: ffe0000: 20000 type 2
  25. mmap: fffc0000: 40000 type 2
  26. mmap: total usable memory: 267910144 (255MB + 511KB)
  27. mb: kernel command line 'init=init'
  28. mb: user init at 0xffffffff8014a000
  29. initfs at 0xffffffff8014a000
  30. pmm: using 0x34c000 as the first physical page
  31. vfs: filesystem initiated
  32. threads: thread data at 0xfffffff0000005c0
  33. threads: process structures initialized
  34. pci: found Host bridge (8086:1237) at 00:00.0
  35. pci: found ISA bridge (8086:7000) at 00:01.0
  36. pci: found IDE interface (8086:7010) at 00:01.1
  37. pci: found Bridge (8086:7113) at 00:01.3
  38. pci: found VGA controller (1234:1111) at 00:02.0
  39. pci: found Ethernet controller (8086:100e) at 00:03.0
  40.  
  41. ********************************
  42.  
  43. The Nightingale Operating System
  44. Version v0.4.1-34-g890c95e
  45.  
  46. ********************************
  47.  
  48. cpu: allowing irqs
  49. initialization took: 64513562
  50. + '' rw-
  51. + 'dev' rw-
  52. + 'zero' r--
  53. + 'serial' rw-
  54. + 'bin' rw-
  55. + 'init' r-x
  56. + 'sh' r-x
  57. + 'echo' r-x
  58. + 'uname' r-x
  59. + 'what' r-x
  60. + 'bf' r-x
  61. + 'strace' r-x
  62. + 'bomb' r-x
  63. + 'cat' r-x
  64. + 'threads' r-x
  65. + 'heapdbg' r-x
  66. + 'false' r-x
  67. + 'forks' r-x
  68. + 'top' r-x
  69. + 'clone' r-x
  70. + 'insmod' r-x
  71. + 'auto_test' r-x
  72. + 'fcat' r-x
  73. + 'text_file' r-x
  74. + 'test.lua' r-x
  75. + 'fib.lua' r-x
  76. + 'test_mod.ko' r-x
  77. + 'thread_mod.ko' r-x
  78. + 'lua' r-x
  79. Starting ring 3 thread at 0x401357
  80.  
  81. Hello World from a kernel thread
  82. Hello World from ring 3!
  83. Nightingale shell
  84. $
  85. $ cat fib.lua
  86.  
  87. function fib(n)
  88. if n < 2 then
  89. return 1
  90. end
  91. return fib(n - 2) + fib(n - 1)
  92. end
  93.  
  94. for i = 1, 30 do
  95. print(fib(i))
  96. end
  97. -> 0
  98. $
  99. $ lua fib.lua
  100. 1
  101. 2
  102. 3
  103. 5
  104. 8
  105. 13
  106. 21
  107. 34
  108. 55
  109. 89
  110. 144
  111. 233
  112. 377
  113. 610
  114. 987
  115. 1597
  116. 2584
  117. 4181
  118. 6765
  119. 10946
  120. 17711
  121. 28657
  122. 46368
  123. 75025
  124. 121393
  125. 196418
  126. 317811
  127. 514229
  128. 832040
  129. 1346269
  130. -> 0
  131. $
  132. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement