Browse Source

slight clean up

master
mortie 7 years ago
parent
commit
1974c8d261
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      inf2270/hw3/oppgave.s

+ 3
- 5
inf2270/hw3/oppgave.s View File

@@ -14,8 +14,8 @@ readbyte:
movl $0,-4(%ebp) # initialize with 0
leal -4(%ebp),%eax # put address in eax
pushl 8(%ebp) # FILE *stream
pushl $1 # nmemb
pushl $1 # size
pushl $1 # int nmemb
pushl $1 # int size
pushl %eax # void *ptr
call fread

@@ -40,7 +40,7 @@ readutf8char:
movl %esp,%ebp #

# Read the first byte into eax
pushl 8(%ebp) # f
pushl 8(%ebp) # FILE *f
call readbyte

# If the character is less than 0xC0,
@@ -193,8 +193,6 @@ wu8_loop:
call writebyte # call
addl $8,%esp # restore esp

movl -8(%ebp),%ecx
bp:
cmp $0,-8(%ebp) # end if -8(%ebp) is 0, as that means there's
je wu8_x # no bytes left to write


Loading…
Cancel
Save