main module TEST32q %define Fred_Debug % set Fred_Debug=true //%set debug_print_ccode = true use TEXTIO declare I_lt_J = true I_gt_J = false I_eq_J = false Byte_Constant_I = 12 Byte_Constant_J = 13 Word_Constant_I = 12345 Word_Constant_J = 12346 Long_Constant_I = 1234567 Long_Constant_J = 1234568 Byte_static_I : static 16 bit integer initially Byte_constant_I Byte_static_J : static 16 bit integer initially Byte_Constant_J Word_static_I : static 16 bit integer initially Word_constant_I Word_static_J : static 16 bit integer initially Word_Constant_J Long_static_I : static 32 bit integer initially Long_constant_I Long_static_J : static 32 bit integer initially Long_constant_J Byte_dynamic_I : 16 bit integer initially Byte_constant_I Byte_dynamic_J : 16 bit integer initially Byte_Constant_J Word_dynamic_I : 16 bit integer initially Word_constant_I Word_dynamic_J : 16 bit integer initially Word_Constant_J Long_dynamic_I : 32 bit integer initially Long_constant_I Long_dynamic_J : 32 bit integer initially Long_constant_J enddeclare procedure TEST_COMPARES param I : in val 32 bit integer J : in val 32 bit integer endparam %if Fred_Debug out_line (TTY, "--------------------") if I >= J do out_line (TTY, "I Greater than or equal to J") otherwise out_line (TTY, "I Less than J") endif if I <= J do out_line (TTY, "I Less than or equal to J") otherwise out_line (TTY, "I Greater than J") endif if I > J do out_line (TTY, " I Greater than J") otherwise out_Line (TTY, " I Less than or equal to J") endif if I < J do out_line (TTY, " I Less than J") otherwise out_line (TTY, " I Greater than or equal to J") endif %endif endprocedure TEST_COMPARES (Long_Constant_I, Long_Constant_J) TEST_COMPARES (Word_Constant_I, Long_Constant_J) TEST_COMPARES (Byte_Constant_I, Word_Constant_J) TEST_COMPARES (Long_Static_I, Long_Static_J) TEST_COMPARES (Word_Static_I, Long_Static_J) TEST_COMPARES (Byte_Static_I, Word_Static_J) TEST_COMPARES (Long_Dynamic_I, Long_Dynamic_J) TEST_COMPARES (Word_Dynamic_I, Long_Dynamic_J) TEST_COMPARES (Byte_Dynamic_I, Word_Dynamic_J) endmodule