User Tools

Site Tools


cdc:nos2.source:nam5871:kappmod

KAPPMOD

Table Of Contents

  • [00010] PRGM KAPPMOD
  • [00055] PROC XTRACE
  • [00056] PROC MGETS
  • [00057] PROC BLINK
  • [00058] PROC OSCHAPP
  • [00153] PROC KGET(KCODE,KL,BUF)

Source Code

KAPPMOD.txt
  1. *DECK KAPPMOD
  2. USETEXT NIPDEF
  3. USETEXT SUPMSG
  4. USETEXT KDIS
  5. USETEXT DISTAIL
  6. USETEXT AHEADER
  7. USETEXT PARAMS
  8. USETEXT PT
  9. USETEXT AT
  10. PRGM KAPPMOD ; # HANDLES K-DISPLAY APPLICATION-MODE TYPE-INS #
  11. STARTIMS ;
  12. #
  13. *1DC KAPPMOD
  14. *
  15. * 1. PROC NAME AUTHOR DATE
  16. * KAPPMOD A. BEN-ARTZI 82/03/01
  17. *
  18. * 2. FUNCTIONAL DESCRIPTION
  19. * HANDLES K-DISPLAY APPLICATION MODE TYPE-INS.
  20. *
  21. * 3. METHOD USED
  22. * VERIFY IF INPUT ALLOWED TO APPLICATION
  23. * CHECK TYPE OF INPUT
  24. * IF FIRST CHARACTER IS "+" OR "-" THEN FORMAT HOP/PAGE
  25. * ELSE FORMAT HOP/CMD AND SEND MESSAGE TO APPLICATION.
  26. *
  27. * 4. ENTRY PARAMETERS
  28. * PARAMS1 - NUMBER OF CHARACTERS ON INPUT
  29. *
  30. * 5. EXIT PARAMETERS
  31. * NONE
  32. *
  33. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  34. * NIPDEF SUPMSG KDIS
  35. * DISTAIL AHEADER PARAMS
  36. * PT AT
  37. *
  38. * 7. ROUTINES AND OVERLAYS CALLED
  39. * BLINK - LINK MESSAGE INTO DATA RING
  40. * MGETS - ALLOCATE BUFFER
  41. * OSCHAPP - SCHEDULE APPLICATION
  42. * XTRACE - TRACE PROCEDURE CALL
  43. *
  44. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  45. * THIS IS A SECONDARY OVERLAY CALLED BY KPTYPIN.
  46. * W A R N I N G - THIS OVERLAY CANNOT EXCEED THE SECONDARY
  47. *CALL OSSIZE
  48.  #
  49. STOPIMS ;
  50. #
  51.   EXTERNAL VARIABLES
  52. #
  53. XREF
  54. BEGIN
  55. PROC XTRACE ;
  56. PROC MGETS ;
  57. PROC BLINK ;
  58. PROC OSCHAPP;
  59. LABEL RJMAIN ;
  60. END
  61. #
  62.   INTERNAL VARIABLES
  63. #
  64. ITEM FIRST C(1) ;
  65. ITEM KAPNO ;
  66. ITEM KCHAR ;
  67. ITEM BUFADDR ;
  68.  
  69. BEGIN
  70. CONTROL IFEQ DEBUG,1 ;
  71. XTRACE("KAPPM") ;
  72. CONTROL FI ;
  73.  
  74. KCHAR = PARAMS1 ;
  75. FIRST = C<0>KBUF1[0] ;
  76.  
  77. BEGIN
  78. KAPNO = KDAN[0] ;
  79. IF FIRST NQ "/" AND # TO THE APPLICATION #
  80. FIRST NQ "-" AND # #
  81. FIRST NQ "+"
  82. AND FIRST NQ "("
  83. AND FIRST NQ ")"
  84. THEN
  85. BEGIN
  86. IF KDNI[0] # MAYBE INPUT TO APPLICATION NOT ALLOWED #
  87. THEN
  88. BEGIN
  89. KREPEAT[0] = "REPEAT.."; # SIGNAL OPERATOR OF ERROR #
  90. GOTO KEXIT ;
  91. END
  92. ELSE # APP. MODE AND INPUT ALLOWED #
  93. BEGIN
  94. #
  95.   SEND THE MSG TO THE APPLICATION WITH HOP/CMD
  96. #
  97. KGET (HOPCMD,(KCHAR+21)/10,BUFADDR) ;
  98. HOPDTL[0]= KCHAR ;
  99. C<0,KCHAR>HOPMSG[0]=C<0,KCHAR>KBUF[0] ;
  100. #
  101.   AND NO INPUT ANY MORE TILL APPLICATION ALLOWES
  102. #
  103. KDNI[0] = TRUE ;
  104. #
  105.   AND SEND IT TO APPLICATION
  106. #
  107. GOTO SEND ;
  108. END
  109. END
  110. ELSE # APP. MODE. ONE OF FUNC (*,-,/,+) RECEIVED #
  111. BEGIN
  112. IF FIRST EQ "+" OR FIRST EQ "-"
  113. OR FIRST EQ "("
  114. OR FIRST EQ ")"
  115. THEN
  116. BEGIN
  117. #
  118.   BUILD THE HOP/PAGE BLOCK
  119. #
  120. KGET(HOPPAGE,LHOPAGE,BUFADDR) ;
  121. HOPPC[0] = FIRST ;
  122. #
  123.   AND SEND IT TO APPLICATION
  124. #
  125. GOTO SEND ;
  126. END
  127. ELSE # NO OTHER CHOICE. JUST "/" #
  128. BEGIN
  129. IF KDBK[0]
  130. THEN
  131. BEGIN
  132. KREPEAT[0] = "REPEAT.."; # SIGNAL ERROR #
  133. GOTO KEXIT;
  134. END
  135. ELSE
  136. BEGIN
  137. KDBK[0] = TRUE;
  138. KGET(HOPBRK,LHOPBRK,BUFADDR);
  139. GOTO SEND;
  140. END
  141. END
  142. END
  143. END
  144. SEND: BEGIN
  145. BLINK(BUFADDR,ATACBA[KAPNO]) ;
  146. OSCHAPP(ATACBA[KAPNO]) ;
  147. END
  148. KEXIT: KBUF1[0] = 0 ;
  149. GOTO RJMAIN ;
  150. #
  151.   --------------------
  152. #
  153. PROC KGET(KCODE,KL,BUF);
  154. ITEM KCODE U;
  155. ITEM KL U;
  156. ITEM BUF U;
  157. BEGIN
  158. MGETS(KL+BLKHSIZE+ABHSIZE,BUF,TRUE);
  159. P<SUPMSG>=BUF+BLKHSIZE+ABHSIZE;
  160. P<AHEADER> = BUF+BLKHSIZE;# BASE APPLICATION HEADER #
  161. PFCSFC[0] = KCODE ; # SET FUNCTION CODE #
  162. # #
  163. ABHTLC[0]=KL; # LENGTH OF MESSAGE #
  164. ABHABT[0]=APPCMD; # THIS IS A COMMAND BLOCK #
  165. ABHACT[0]=CT60TRANS; #CHARACTER TYPE #
  166. ABHABN[0]=0;
  167. ABHADR[0]=0;
  168. RETURN;
  169. END
  170. END # MAIN #
  171. TERM
cdc/nos2.source/nam5871/kappmod.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator