SHARE
TWEET

Untitled

a guest Apr 25th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. .set ALIGN, 1 << 0
  3. .set MEMINFO, 1 << 1
  4. .set FLAGS, ALIGN | MEMINFO
  5. .set MAGIC, 0x1BADB002
  6. .set CHECKSUM, -(MAGIC + FLAGS)
  7.  
  8. .section .multiboot
  9. .align 4
  10. .long MAGIC
  11. .long FLAGS
  12. .long CHECKSUM
  13.  
  14.  
  15. .text
  16.  
  17. .global _start
  18. _start:
  19.    
  20.     xor $t0, $t0
  21.     xor $t1, $t1
  22.     xor $t2, $t2
  23.     xor $t3, $t3
  24.    
  25.     /* write enable bit to address 0xCF8 */
  26.     or $t0, 0x80000000
  27.     or $t1, 0x14000CF8
  28.    
  29.     sw $t0, 0($t1)
  30.     nop
  31.    
  32.     /* read vendor */
  33.     or $t2, 0x14000CFC
  34.    
  35.     lh $t3, 0($t2)
  36.     nop
  37.    
  38. .hang:
  39.    
  40.     pause
  41.     j .hang
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top