summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..c6cb39e
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,20 @@
+#![no_std]
+#![no_main]
+
+use core::panic::PanicInfo;
+
+#[unsafe(no_mangle)]
+pub extern "C" fn _start() -> ! {
+ // 'k'
+ loop{unsafe {core::arch::asm!(
+ "out dx, al", in("al") 0x6Bu8
+ )}}
+}
+
+#[panic_handler]
+fn panic(_: &PanicInfo) -> ! {
+ // 'p'
+ loop{unsafe {core::arch::asm!(
+ "out dx, al", in("al") 0x70u8
+ )}}
+}