Routines 
Prev: 36499  Up: Map  Next: 36573 


36543  LD (23677),DE  Load contents of DE into coordinate storage (start point of line)  
36547  LD A,B  Subtract ycoordinate of start of line from ycoordinate of end of line...  
36548  SUB D  ...to get deltay  
36549  LD D,1  Set direction of vertical change to +1 (upward)  
36551  JR NC,36557  If deltay is positive (i.e. upward) then skip ahead to 36557  
36553  CPL  Multiply deltay by 1 (downward) to get absolute magnitude...  
36554  INC A  ...  
36555  LD D,255  Set direction of vertical change to 1 (downward)  
36557  LD B,A  Load B with magnitude of difference in ycoordinate between start and end of line  
36558  LD A,C  Subtract xcoordinate of start of line from ycoordinate of end of line...  
36559  SUB E  ...to get deltax  
36560  LD E,1  Set direction of horizontal change to +1 (rightward)  
36562  JR NC,36568  If deltax is positive (i.e. rightward) then skip ahead to 36568  
36564  CPL  Multiply deltax by 1 (leftward) to get absolute magnitude...  
36565  INC A  ...  
36566  LD E,255  Set direction of vertical change to 1 (leftward)  
36568  LD C,A  Load C with magnitude of difference in xcoordinate between start and end of line  
36569  CALL 9402  Draw the line (ROM routine)  
36572  RET  Return 
Prev: 36499  Up: Map  Next: 36573 