[list -] %INCLUDE "Along32.inc" %INCLUDE "Macros_Along.inc" [list +] ;--------------------------------------------------------------------- extern EasterSunday ; HLL prototype: ; void EasterSunday(uint year); ; Receives an unsigned 32-bit integer representing a year. ; Determines the date of Easter Sunday in year. The date is written ; to stdout. ; Receives: EAX = year ; Returns: Nothing ;--------------------------------------------------------------------- SECTION .data hrule times 25 db ('-') db 10,0 header times 2 db ' ' db 'Year Easter Sunday',10,0 SECTION .bss h resd 1 SECTION .text global _start _start: call ReadDec ; read an unsigned integer mov [h],eax ; move the integer to h mov edx,hrule ; write hrule call WriteString mov edx,header ; write headings call WriteString mov edx,hrule ; write hrule call WriteString .L0: cmp dword [h],0 ; while h > 0 do jle .L1 call ReadDec ; read an unsigned int call EasterSunday dec dword [h] ; decrement h jmp .L0 ; end while .L1: mov edx,hrule ; write hrule call WriteString Exit {0}