Add Arguments.c 464 B

1234567891011121314151617181920212223
  1. // Add the first two integers passed to the program
  2. #define RETURN_VALUE
  3. #define USE_TI89
  4. #define USE_TI92PLUS
  5. #define USE_V200
  6. #define MIN_AMS 101
  7. #include <args.h>
  8. #include <estack.h>
  9. void _main(void)
  10. {
  11. ESI argptr = top_estack;
  12. short a = GetIntArg (argptr);
  13. short b = GetIntArg (argptr);
  14. while (GetArgType (top_estack) != END_TAG) // Clean up arguments
  15. top_estack = next_expression_index (top_estack);
  16. top_estack--;
  17. push_longint (a + b);
  18. }