Difference between revisions of "CSC231 Homework 4 Solutions 2014"
(4 intermediate revisions by the same user not shown) | |||
Line 85: | Line 85: | ||
int 0x80 ;print first letter in cap | int 0x80 ;print first letter in cap | ||
− | + | mov ecx, 0 | |
+ | mov ecx, byte[esi] ;move the integer to ecx | ||
dec ecx ;minus the already printed first letter | dec ecx ;minus the already printed first letter | ||
inc dword[counter] | inc dword[counter] | ||
Line 134: | Line 135: | ||
mov edx, line_len | mov edx, line_len | ||
push ecx | push ecx | ||
− | + | mov ecx, newLine | |
int 0x80 | int 0x80 | ||
pop ecx | pop ecx | ||
Line 274: | Line 275: | ||
push ecx | push ecx | ||
mov eax, dword[counter] | mov eax, dword[counter] | ||
+ | inc dword[counter] | ||
call printFibMsg | call printFibMsg | ||
Line 374: | Line 376: | ||
index dd 7 | index dd 7 | ||
+ | section .text | ||
+ | |||
_printHex: push eax | _printHex: push eax | ||
push ebx | push ebx |