main.asm 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ;; This file is part of asmc, a bootstrapping OS with minimal seed
  2. ;; Copyright (C) 2018 Giovanni Mascellani <gio@debian.org>
  3. ;; https://gitlab.com/giomasce/asmc
  4. ;; This program is free software: you can redistribute it and/or modify
  5. ;; it under the terms of the GNU General Public License as published by
  6. ;; the Free Software Foundation, either version 3 of the License, or
  7. ;; (at your option) any later version.
  8. ;; This program is distributed in the hope that it will be useful,
  9. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. ;; GNU General Public License for more details.
  12. ;; You should have received a copy of the GNU General Public License
  13. ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. str_helloasm:
  15. db 'Hello, ASM!'
  16. db 0xa
  17. db 0
  18. str_atapio_asm:
  19. db 'atapio.asm'
  20. db 0
  21. str_atapio_test_asm:
  22. db 'atapio_test.asm'
  23. db 0
  24. str_atapio_test:
  25. db 'atapio_test'
  26. db 0
  27. main:
  28. ;; Greetings!
  29. push str_helloasm
  30. push 1
  31. call platform_log
  32. add esp, 8
  33. ;; Compile the ATA PIO driver
  34. push str_atapio_asm
  35. call platform_assemble
  36. add esp, 4
  37. ;; Compile the ATA PIO test
  38. push str_atapio_test_asm
  39. call platform_assemble
  40. add esp, 4
  41. ;; Call atapio_test
  42. push 0
  43. push str_atapio_test
  44. call platform_get_symbol
  45. add esp, 8
  46. call eax
  47. ret