Prev: 08924 Up: Map Next: 08980
08967: THE 'STK-TO-BC' SUBROUTINE
Used by the routines at PR_ITEM_1, POINT_SUB, PLOT, DRAW_LINE, S_SCRN_S and S_ATTR_S.
This subroutine loads two floating point numbers into the BC register pair. It is thus used to pick up parameters in the range 0 to 255. It also obtains in DE the 'diagonal move' values (+/-1,+/-1) which are used in DRAW_LINE.
Output
B First number from the calculator stack
C Second number from the calculator stack
D Sign of the first number (1 or 255)
E Sign of the second number (1 or 255)
STK_TO_BC 08967 CALL STK_TO_A First number to A.
08970 LD B,A Hence to B.
08971 PUSH BC Save it briefly.
08972 CALL STK_TO_A Second number to A.
08975 LD E,C Its sign indicator to E.
08976 POP BC Restore first number.
08977 LD D,C Its sign indicator to D.
08978 LD C,A Second number to C.
08979 RET BC, DE are now as required.
Prev: 08924 Up: Map Next: 08980