Changeset 165 for soft/giet_vm/apps/pgcd/main.c
- Timestamp:
- Jul 4, 2012, 2:51:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/apps/pgcd/main.c
r160 r165 7 7 unsigned int opy; 8 8 9 tty_printf(" Interactive PGCD \n");9 giet_tty_printf(" Interactive PGCD \n"); 10 10 11 11 while (1) 12 12 { 13 tty_printf("\n*******************\n");14 tty_printf("operand X = ");15 tty_getw_irq(&opx);16 tty_printf("\n");17 tty_printf("operand Y = ");18 tty_getw_irq(&opy);19 tty_printf("\n");13 giet_tty_printf("\n*******************\n"); 14 giet_tty_printf("operand X = "); 15 giet_tty_getw( &opx ); 16 giet_tty_printf("\n"); 17 giet_tty_printf("operand Y = "); 18 giet_tty_getw( &opy ); 19 giet_tty_printf("\n"); 20 20 if( (opx == 0) || (opy == 0) ) 21 21 { 22 tty_printf("operands must be larger than 0\n");22 giet_tty_printf("operands must be larger than 0\n"); 23 23 } 24 24 else … … 29 29 else opy = opy - opx; 30 30 } 31 tty_printf("pgcd = %d\n", opx);31 giet_tty_printf("pgcd = %d\n", opx); 32 32 } 33 33 }
Note: See TracChangeset
for help on using the changeset viewer.