20test.mac 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ; 20-TEST SIMPLE I/O TESTS, HANDCODED
  2. TITLE 20TEST
  3. ; MLG, 20 JULY 1982
  4. SEARCH MONSYM
  5. RADIX ^D10
  6. EXTERN GETC20,PUTC20,PUTI20,ERR20,TIMC20,QUIT20
  7. ENTRY MAIN20
  8. ST=15
  9. MAIN20: MOVEI 1,1
  10. PUSHJ ST, PUTI20 ; Print a 1 for first test
  11. MOVEI 1,10
  12. PUSHJ ST, PUTC20 ; EOL to flush line
  13. MOVEI 1,2
  14. PUSHJ ST, PUTI20 ; Second test
  15. MOVEI 1,65
  16. PUSHJ ST, PUTC20 ; A capital A
  17. MOVEI 1,66
  18. PUSHJ ST, PUTC20 ; A capital B
  19. MOVEI 1,10
  20. PUSHJ ST, PUTC20 ; EOL to flush line
  21. MOVEI 1,3
  22. PUSHJ ST, PUTI20 ; Third test, type in AB <cr>
  23. PUSHJ ST, GETC20
  24. PUSHJ ST, PUTC20 ; Should print A65
  25. PUSHJ ST, PUTI20
  26. MOVEI 1,10
  27. PUSHJ ST,PUTC20
  28. PUSHJ ST, GETC20
  29. PUSHJ ST, PUTC20 ; Should print B66
  30. PUSHJ ST, PUTI20
  31. MOVEI 1,10
  32. PUSHJ ST,PUTC20
  33. PUSHJ ST, GETC20
  34. PUSHJ ST, PUTI20 ; should print 10 and EOL
  35. PUSHJ ST, PUTC20
  36. MOVEI 1,10
  37. PUSHJ ST,PUTC20
  38. movei 1,4
  39. pushj st, puti20 ; last test
  40. Pushj st,timc20
  41. PushJ st, puti20
  42. movei 1,100
  43. pushj st, err20
  44. movei 1,26
  45. pushj st, putc20 ; eof to flush buffer
  46. movei 1,0
  47. pushj st, quit20
  48. POPJ ST,
  49. END