Prev: 22DC Up: Map Next: 2314
2307: 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 +00 to +FF. 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 (+01 or +FF)
E Sign of the second number (+01 or +FF)
STK_TO_BC 2307 CALL STK_TO_A First number to A.
230A LD B,A Hence to B.
230B PUSH BC Save it briefly.
230C CALL STK_TO_A Second number to A.
230F LD E,C Its sign indicator to E.
2310 POP BC Restore first number.
2311 LD D,C Its sign indicator to D.
2312 LD C,A Second number to C.
2313 RET BC, DE are now as required.
Prev: 22DC Up: Map Next: 2314