ics lab4: y86 assembler

36
1 ICS Lab4: Y86 Assembler

Upload: anakin

Post on 08-Feb-2016

87 views

Category:

Documents


2 download

DESCRIPTION

ICS Lab4: Y86 Assembler. Introduction. Task. Y86 Assembler Input: y86 assembly file (e.g., asum.ys ) Output: y86 binary file (e.g. asum.bin ) Side effect: print readable image to screen Info Correct: nothing Failure: error message. # begin of asum.ys . pos 0 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ICS Lab4:  Y86 Assembler

1

ICS Lab4: Y86 Assembler

Page 2: ICS Lab4:  Y86 Assembler

Introduction

2

Page 3: ICS Lab4:  Y86 Assembler

3

Task

• Y86 Assembler– Input: y86 assembly file (e.g., asum.ys)– Output: y86 binary file (e.g. asum.bin)– Side effect: print readable image to screen

– Info• Correct: nothing• Failure: error message

Page 4: ICS Lab4:  Y86 Assembler

4

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

# Function SumSum: pushl %ebp

rrmovl %esp,%ebpmrmovl 8(%ebp),%ecxmrmovl 12(%ebp),%edxxorl %eax,%eaxandl %edx,%edxje End

Loop: mrmovl (%ecx),%esiaddl %esi,%eaxirmovl $4,%ebxaddl %ebx,%ecxirmovl $-1,%ebxaddl %ebx,%edxjne Loop

End: rrmovl %ebp,%esppopl %ebpret

.pos 0x100Stack: # end of asum.ys

Page 5: ICS Lab4:  Y86 Assembler

5

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

# Function SumSum: pushl %ebp

rrmovl %esp,%ebpmrmovl 8(%ebp),%ecxmrmovl 12(%ebp),%edxxorl %eax,%eaxandl %edx,%edxje End

Loop: mrmovl (%ecx),%esiaddl %esi,%eaxirmovl $4,%ebxaddl %ebx,%ecxirmovl $-1,%ebxaddl %ebx,%edxjne Loop

End: rrmovl %ebp,%esppopl %ebpret

.pos 0x100Stack: # end of asum.ys

Page 6: ICS Lab4:  Y86 Assembler
Page 7: ICS Lab4:  Y86 Assembler

7

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

# Function SumSum: pushl %ebp

rrmovl %esp,%ebpmrmovl 8(%ebp),%ecxmrmovl 12(%ebp),%edxxorl %eax,%eaxandl %edx,%edxje End

Loop: mrmovl (%ecx),%esiaddl %esi,%eaxirmovl $4,%ebxaddl %ebx,%ecxirmovl $-1,%ebxaddl %ebx,%edxjne Loop

End: rrmovl %ebp,%esppopl %ebpret

.pos 0x100Stack: # end of asum.ys

comment

Page 8: ICS Lab4:  Y86 Assembler

8

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

# Function SumSum: pushl %ebp

rrmovl %esp,%ebpmrmovl 8(%ebp),%ecxmrmovl 12(%ebp),%edxxorl %eax,%eaxandl %edx,%edxje End

Loop: mrmovl (%ecx),%esiaddl %esi,%eaxirmovl $4,%ebxaddl %ebx,%ecxirmovl $-1,%ebxaddl %ebx,%edxjne Loop

End: rrmovl %ebp,%esppopl %ebpret

.pos 0x100Stack: # end of asum.ys

directive

Page 9: ICS Lab4:  Y86 Assembler

9

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

# Function SumSum: pushl %ebp

rrmovl %esp,%ebpmrmovl 8(%ebp),%ecxmrmovl 12(%ebp),%edxxorl %eax,%eaxandl %edx,%edxje End

Loop: mrmovl (%ecx),%esiaddl %esi,%eaxirmovl $4,%ebxaddl %ebx,%ecxirmovl $-1,%ebxaddl %ebx,%edxjne Loop

End: rrmovl %ebp,%esppopl %ebpret

.pos 0x100Stack: # end of asum.ys

Symbol

Page 10: ICS Lab4:  Y86 Assembler

10

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

# Function SumSum: pushl %ebp

rrmovl %esp,%ebpmrmovl 8(%ebp),%ecxmrmovl 12(%ebp),%edxxorl %eax,%eaxandl %edx,%edxje End

Loop: mrmovl (%ecx),%esiaddl %esi,%eaxirmovl $4,%ebxaddl %ebx,%ecxirmovl $-1,%ebxaddl %ebx,%edxjne Loop

End: rrmovl %ebp,%esppopl %ebpret

.pos 0x100Stack: # end of asum.ys

Relocation

Page 11: ICS Lab4:  Y86 Assembler

11

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

Page 12: ICS Lab4:  Y86 Assembler

12

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

| # begin of asum.ys 0x000: | .pos 0 0x000: 30f400010000 | init: irmovl Stack,

%esp 0x006: 30f500010000 | irmovl Stack, %ebp 0x00c: 8024000000 | call Main 0x011: 00 | halt | 0x014: | .align 4 0x014: 0d000000 | array:.long 0xd 0x018: c0000000 | .long 0xc0 0x01c: 000b0000 | .long 0xb00 0x020: 00a00000 | .long 0xa000 | # Function Main 0x024: a05f | Main: pushl %ebp 0x026: 2045 | rrmovl %esp,%ebp 0x028: 30f004000000 | irmovl $4,%eax 0x02e: a00f | pushl %eax 0x030: 30f214000000 | irmovl array,%edx 0x036: a02f | pushl %edx 0x038: 8042000000 | call Sum 0x03d: 2054 | rrmovl %ebp,%esp 0x03f: b05f | popl %ebp 0x041: 90 | ret

Readable Dump

Page 13: ICS Lab4:  Y86 Assembler

13

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

| # begin of asum.ys 0x000: | .pos 0 0x000: 30f400010000 | init: irmovl Stack,

%esp 0x006: 30f500010000 | irmovl Stack, %ebp 0x00c: 8024000000 | call Main 0x011: 00 | halt | 0x014: | .align 4 0x014: 0d000000 | array:.long 0xd 0x018: c0000000 | .long 0xc0 0x01c: 000b0000 | .long 0xb00 0x020: 00a00000 | .long 0xa000 | # Function Main 0x024: a05f | Main: pushl %ebp 0x026: 2045 | rrmovl %esp,%ebp 0x028: 30f004000000 | irmovl $4,%eax 0x02e: a00f | pushl %eax 0x030: 30f214000000 | irmovl array,%edx 0x036: a02f | pushl %edx 0x038: 8042000000 | call Sum 0x03d: 2054 | rrmovl %ebp,%esp 0x03f: b05f | popl %ebp 0x041: 90 | ret

Readable Dump

Page 14: ICS Lab4:  Y86 Assembler

14

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

| # begin of asum.ys 0x000: | .pos 0 0x000: 30f400010000 | init: irmovl Stack,

%esp 0x006: 30f500010000 | irmovl Stack, %ebp 0x00c: 8024000000 | call Main 0x011: 00 | halt | 0x014: | .align 4 0x014: 0d000000 | array:.long 0xd 0x018: c0000000 | .long 0xc0 0x01c: 000b0000 | .long 0xb00 0x020: 00a00000 | .long 0xa000 | # Function Main 0x024: a05f | Main: pushl %ebp 0x026: 2045 | rrmovl %esp,%ebp 0x028: 30f004000000 | irmovl $4,%eax 0x02e: a00f | pushl %eax 0x030: 30f214000000 | irmovl array,%edx 0x036: a02f | pushl %edx 0x038: 8042000000 | call Sum 0x03d: 2054 | rrmovl %ebp,%esp 0x03f: b05f | popl %ebp 0x041: 90 | ret

Readable Dump

Page 15: ICS Lab4:  Y86 Assembler

15

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

| # begin of asum.ys 0x000: | .pos 0 0x000: 30f400010000 | init: irmovl Stack,

%esp 0x006: 30f500010000 | irmovl Stack, %ebp 0x00c: 8024000000 | call Main 0x011: 00 | halt | 0x014: | .align 4 0x014: 0d000000 | array:.long 0xd 0x018: c0000000 | .long 0xc0 0x01c: 000b0000 | .long 0xb00 0x020: 00a00000 | .long 0xa000 | # Function Main 0x024: a05f | Main: pushl %ebp 0x026: 2045 | rrmovl %esp,%ebp 0x028: 30f004000000 | irmovl $4,%eax 0x02e: a00f | pushl %eax 0x030: 30f214000000 | irmovl array,%edx 0x036: a02f | pushl %edx 0x038: 8042000000 | call Sum 0x03d: 2054 | rrmovl %ebp,%esp 0x03f: b05f | popl %ebp 0x041: 90 | ret

Readable Dump

relocation

Page 16: ICS Lab4:  Y86 Assembler

16

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret

| # begin of asum.ys 0x000: | .pos 0 0x000: 30f400010000 | init: irmovl Stack,

%esp 0x006: 30f500010000 | irmovl Stack, %ebp 0x00c: 8024000000 | call Main 0x011: 00 | halt | 0x014: | .align 4 0x014: 0d000000 | array: .long 0xd 0x018: c0000000 | .long 0xc0 0x01c: 000b0000 | .long 0xb00 0x020: 00a00000 | .long 0xa000 | # Function Main 0x024: a05f | Main: pushl %ebp 0x026: 2045 | rrmovl %esp,%ebp 0x028: 30f004000000 | irmovl $4,%eax 0x02e: a00f | pushl %eax 0x030: 30f214000000 | irmovl array,%edx 0x036: a02f | pushl %edx 0x038: 8042000000 | call Sum 0x03d: 2054 | rrmovl %ebp,%esp 0x03f: b05f | popl %ebp 0x041: 90 | ret

Readable Dump

relocation

Page 17: ICS Lab4:  Y86 Assembler

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret 17

| # begin of asum.ys 0x000: | .pos 0 0x000: 30f400010000 | init: irmovl Stack,

%esp 0x006: 30f500010000 | irmovl Stack, %ebp 0x00c: 8024000000 | call Main 0x011: 00 | halt | 0x014: | .align 4 0x014: 0d000000 | array: .long 0xd 0x018: c0000000 | .long 0xc0 0x01c: 000b0000 | .long 0xb00 0x020: 00a00000 | .long 0xa000 | # Function Main 0x024: a05f | Main: pushl %ebp 0x026: 2045 | rrmovl %esp,%ebp 0x028: 30f004000000 | irmovl $4,%eax 0x02e: a00f | pushl %eax 0x030: 30f214000000 | irmovl array,%edx 0x036: a02f | pushl %edx 0x038: 8042000000 | call Sum 0x03d: 2054 | rrmovl %ebp,%esp 0x03f: b05f | popl %ebp 0x041: 90 | ret

30f4 0001 0000 30f5 0001 0000 8024 0000 0000 0000 0d00 0000 c000 0000 000b 0000 00a0 0000 a05f 2045 30f0 0400 0000 a00f 30f2 1400 0000 a02f 8042 0000 0020 54b05f90

Readable Dump

Binary Code

Page 18: ICS Lab4:  Y86 Assembler

# begin of asum.ys.pos 0

init: irmovl Stack, %espirmovl Stack, %ebpcall Mainhalt

.align 4array: .long 0xd

.long 0xc0

.long 0xb00

.long 0xa000# Function MainMain: pushl %ebp

rrmovl %esp,%ebpirmovl $4,%eaxpushl %eaxirmovl array,%edxpushl %edxcall Sumrrmovl %ebp,%esppopl %ebpret 18

| # begin of asum.ys 0x000: | .pos 0 0x000: 30f400010000 | init: irmovl Stack,

%esp 0x006: 30f500010000 | irmovl Stack, %ebp 0x00c: 8024000000 | call Main 0x011: 00 | halt | 0x014: | .align 4 0x014: 0d000000 | array: .long 0xd 0x018: c0000000 | .long 0xc0 0x01c: 000b0000 | .long 0xb00 0x020: 00a00000 | .long 0xa000 | # Function Main 0x024: a05f | Main: pushl %ebp 0x026: 2045 | rrmovl %esp,%ebp 0x028: 30f004000000 | irmovl $4,%eax 0x02e: a00f | pushl %eax 0x030: 30f214000000 | irmovl array,%edx 0x036: a02f | pushl %edx 0x038: 8042000000 | call Sum 0x03d: 2054 | rrmovl %ebp,%esp 0x03f: b05f | popl %ebp 0x041: 90 | ret

30f4 0001 0000 30f5 0001 0000 8024 0000 0000 0000 0d00 0000 c000 0000 000b 0000 00a0 0000 a05f 2045 30f0 0400 0000 a00f 30f2 1400 0000 a02f 8042 0000 0020 54b05f90

Readable Dump

Binary Code

Page 19: ICS Lab4:  Y86 Assembler

19

Intro

• Y86 Assembler– Source code: y86asm.c & y86asm.h– ./y86asm -v asum.ys > asum.yo

• asum.ys: assembly code• asum.bin: binary code• asum.yo: readable dump

– Test-suite: simple, error and apps– Base-system: y86asm-base

– Requirement: the same output! (bin & yo)

Page 20: ICS Lab4:  Y86 Assembler

Framework

20

Page 21: ICS Lab4:  Y86 Assembler

assemble

relocate

line by line

Symbol table

Relocatetable

binfile

asm code pushl %eax call Sum irmovl $4,%eax

bin code 30f4 0001 0000 30f5 0001 0000 8024 0000 0000

print

screen 30f4 | pushl .. 30f5 | pushl .. 8024 | call ..

-v

done

Page 22: ICS Lab4:  Y86 Assembler

int main(int argc, char *argv[]){ /* option (-v) */ init(); /* init */

/* open and assemble .ys file */ assemble(in);

/* relocate binary code */ relocate();

/* create and generate .bin file */ binfile(out);

/* print to screen (.yo file) */ if (screen) print_screen();

finit(); /* finit */ return 0;}

22

Page 23: ICS Lab4:  Y86 Assembler

int main(int argc, char *argv[]){ /* option (-v) */ init(); /* init */

/* open and assemble .ys file */ assemble(in);

/* relocate binary code */ relocate();

/* create and generate .bin file */ binfile(out);

/* print to screen (.yo file) */ if (screen) print_screen();

finit(); /* finit */ return 0;}

23

int assemble(FILE *in){ while(fget(..) != NULL); { /* new line and fill it */ line = malloc(..); line->y86asm = ...;

/* parse the line */ parse_line(line); } return 0;}

Page 24: ICS Lab4:  Y86 Assembler

int main(int argc, char *argv[]){ /* option (-v) */ init(); /* init */

/* open and assemble .ys file */ assemble(in);

/* relocate binary code */ relocate();

/* create and generate .bin file */ binfile(out);

/* print to screen (.yo file) */ if (screen) print_screen();

finit(); /* finit */ return 0;}

24

int relocate(void){ tmp = reltab; while(tmp != NULL); { /* find symbol */ /* fill address */

/* next */ tmp = tmp->next; } return 0;}

Page 25: ICS Lab4:  Y86 Assembler

int main(int argc, char *argv[]){ /* option (-v) */ init(); /* init */

/* open and assemble .ys file */ assemble(in);

/* relocate binary code */ relocate();

/* create and generate .bin file */ binfile(out);

/* print to screen (.yo file) */ if (screen) print_screen();

finit(); /* finit */ return 0;}

25

int binfile(void){ /* prepare image */ image = malloc(..);

/* fill binary code */

/* write output file */ return 0;}

Page 26: ICS Lab4:  Y86 Assembler

int main(int argc, char *argv[]){ /* option (-v) */ init(); /* init */

/* open and assemble .ys file */ assemble(in);

/* relocate binary code */ relocate();

/* create and generate .bin file */ binfile(out);

/* print to screen (.yo file) */ if (screen) print_screen();

finit(); /* finit */ return 0;}

26

Implemented (good example)

Page 27: ICS Lab4:  Y86 Assembler

Comment: ‘#’ => skip rest

Label: ‘:’ => add to symtab => continue

Instruction: keyword => fill codes => continue

keyword in+op rest byteshalt 0:0 1nop 1:0 1rrmovl 2:0 regA, regB 2cmovXX 2:N regA, regB 2irmovl 3:0 imm, regB 6rmmovl 4:0 regA, D(regB) 6mrmovl 5:0 D(regB), regA 6OPL 6:N regA, regB 2jXX 7:N Label 5call 8:0 Label 5ret 9:0 1pushl a:0 regA 2popl b:0 regA 2directive: ‘.’ .pos - digit 0 .align - digit 0 .l|w|b - D 4|2|1

error

A line of assembly code

Page 28: ICS Lab4:  Y86 Assembler

28

typedef struct symbol { char *name; int addr; struct symbol *next;} symbol_t;

line_t *y86bin_listhead; /* head */line_t *y86bin_listtail; /* tail */int y86asm_lineno;int vmaddr; /* address */

symbol_t *symtab;reloc_t *reltab;

typedef struct line { type_t type; /* TYPE_COMM: no y86bin, TYPE_INS: both y86bin and y86asm */ bin_t y86bin; char *y86asm; struct line *next;} line_t;

typedef struct bin { int addr; byte_t codes[6]; int bytes;} bin_t;

typedef enum{ TYPE_COMM, TYPE_INS, TYPE_ERR } type_t;

typedef struct reloc { bin_t *y86bin; char *name; struct reloc *next;} reloc_t;

Page 29: ICS Lab4:  Y86 Assembler

# nop, nop and haltnopnophalt # Terminate program

# end

29

nop.ys

./y86asm –v nop.ys > nop.yo

make nop.yoor

| # nop, nop and halt 0x000: 10 | nop 0x001: 10 | nop 0x002: 00 | halt # Terminate program | # end

nop.yo

NO “nop.bin” now

Page 30: ICS Lab4:  Y86 Assembler

Testbed

30*Acknowledgement: Li Cheng, Yuchen Liu

Page 31: ICS Lab4:  Y86 Assembler

31

Resource

• Files– y86asm.c/y86asm.h (svn commit)– Makefile– yat/yat.c

– y86-base: y86asm-base, Makefile, {ins}.ys, {app}.ys

– y86-ins: Makefile, {ins}.ys– y86-err: {err}.ys– y86-app: {app}.ys

Page 32: ICS Lab4:  Y86 Assembler

32

Tools

• Makefile– make - compiling y86asm– make clean - remove y86asm, *.o, *.yo, …– make yat - compiling yat– make **.yo - generate ??.yo file by y86asm

– y86-base/make - generate yo files foreach

Page 33: ICS Lab4:  Y86 Assembler

33

Tools

• yatOption specification: -s test single instruction ./y86-ins/<name>.ys, or error-handling case in ./y86-err/<name>.ys e.g. yat -s rrmovl, yat -s symbol-error -S test both instructions and error-handling -a test single application ./y86-app/<name>.ys -A test the application codes in ./y86-app -F test instructions, error-handling and application codes, and you will get a total score -h print this message

Usage: yat -s <name> Or: yat -S Or: yat -a <name> Or: yat -A Or: yat -F

Page 34: ICS Lab4:  Y86 Assembler

34

Tools

• yatOption specification: -s test single instruction ./y86-ins/<name>.ys, or error-handling case in ./y86-err/<name>.ys e.g. yat -s rrmovl, yat -s symbol-error -S test both instructions and error-handling -a test single application ./y86-app/<name>.ys -A test the application codes in ./y86-app -F test instructions, error-handling and application codes, and you will get a total score -h print this message

Usage: yat -s <name> Or: yat -S Or: yat -a <name> Or: yat -A Or: yat -F

Score for instructions: 32.00/32.00Score for error-handling cases: 8.00/ 8.00Score for applications: 40.00/40.00Total score: 80.00/80.00

Page 35: ICS Lab4:  Y86 Assembler

35

$./yat –s halt[ Testing instruction: halt ]Binary files halt.bin.base and halt.bin differ[ Result: Fail ]Score for instructions: 0.00/ 1.00

$./yat –s addl[ Testing instruction: addl ][L2]: Invalid instr[L2]: Assemble y86 code errormake: *** [addl.yo] Error 1[ Result: Fail ]Score for instructions: 0.00/ 1.00

Page 36: ICS Lab4:  Y86 Assembler

36

Cheating will not be tolerated All homework, labs and exams are to be done individually.

It is your responsibility to ensure that “your passwords are well-guarded, directories protected, and printouts do not fall into other hands”.