瀏覽代碼

slight clean up

master
mortie 7 年之前
父節點
當前提交
1974c8d261
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3
    5
      inf2270/hw3/oppgave.s

+ 3
- 5
inf2270/hw3/oppgave.s 查看文件

@@ -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…
取消
儲存