mortie 7 лет назад
Родитель
Сommit
1974c8d261
1 измененных файлов: 3 добавлений и 5 удалений
  1. 3
    5
      inf2270/hw3/oppgave.s

+ 3
- 5
inf2270/hw3/oppgave.s Просмотреть файл

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


movl %esp,%ebp # movl %esp,%ebp #


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


# If the character is less than 0xC0, # If the character is less than 0xC0,
call writebyte # call call writebyte # call
addl $8,%esp # restore esp 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 cmp $0,-8(%ebp) # end if -8(%ebp) is 0, as that means there's
je wu8_x # no bytes left to write je wu8_x # no bytes left to write



Загрузка…
Отмена
Сохранить