SHARE
TWEET

Untitled

a guest Aug 12th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .text
  2.  
  3. .global getline
  4.  
  5. getline:
  6.         li 7, loop@ha
  7.         addi 7, 7, loop@l
  8.         mr 8, 3
  9.         mr 10, 4
  10.         li 9, 1
  11.         loop:
  12.         li 0, 3
  13.         li 3, 1
  14.         mr 4, 8
  15.         li 5, 1
  16.         sc
  17.         lbz 4, 0(8)
  18.         cmpwi 4, 0xA0
  19.         bc 12, 2, end
  20.         subf 10, 10, 9
  21.         addi 8, 8, 1
  22.         cmpwi 10, 0
  23.         bc 12, 1, loop
  24.         end:
  25.         li 4, 0
  26.         stb 4, 0(8)
  27.         b lr
RAW Paste Data
Top