lib.rs 503 B

12345678910111213141516171819202122232425262728
  1. #![no_std] // <1>
  2. #![no_main] // <1>
  3. #![feature(core_intrinsics)] // <2>
  4. #![feature(alloc_error_handler)]
  5. #![feature(panic_info_message)]
  6. #[allow(non_upper_case_globals)]
  7. #[allow(non_camel_case_types)]
  8. #[allow(non_snake_case)]
  9. use core::panic::PanicInfo;
  10. use include::internal::bindings::bindings::putchar;
  11. mod include;
  12. #[panic_handler]
  13. fn panic(_info: &PanicInfo) -> ! {
  14. loop {}
  15. }
  16. #[no_mangle]
  17. pub extern "C" fn scanf() {
  18. loop {
  19. unsafe {
  20. putchar(88);
  21. }
  22. }
  23. }