home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / MBUG / MBUG013.ARC / DRAW64.PRO < prev    next >
Text File  |  1979-12-31  |  6KB  |  110 lines

  1. procedure DRAW; {Version for 64 X 16 screen}
  2.  
  3. { This procedure developed for Turbo Pascal
  4.   LORES Graphics for use with the MicroBee
  5.              by Bob Burt
  6.  
  7.    This version used to plot on a 64 X 16
  8.    format screen.  Use in conjunction with
  9.          LORES64.PRO and PLOT.PRO            }
  10.  
  11. begin
  12.   inline ($18/$0B/           { JUMP:   JR     LINE        }
  13.           0/0/0/0/0/0/0/0/   { BLOCK:  DEFS   11          }
  14.           0/0/0/             {                            }
  15.           $3A/*-3/           { LINE:   LD     A,(BLOCK+9) }
  16.           $B7/               {         OR     A           }
  17.           $28/$0D/           {         JR     Z,LINE10    }
  18.           $21/0/0/           {         LD     HL,0        }
  19.           $ED/$5B/*-18/      {         LD     DE,(BLOCK+4)}
  20.           $B7/               {         OR     A           }
  21.           $ED/$52/           {         SBC    HL,DE       }
  22.           $22/*-24/          {         LD     (BLOCK+4),HL}
  23.  
  24.           $3A/*-21/          { LINE10: LD     A,(BLOCK+10)}
  25.           $B7/               {         OR     A           }
  26.           $28/$0D/           {         JR     Z,LINE20    }
  27.           $21/0/0/           {         LD     HL,0        }
  28.           $ED/$5B/*-35/      {         LD     DE.(BLOCK+6)}
  29.           $B7/               {         OR     A           }
  30.           $ED/$52/           {         SBC    HL,DE       }
  31.           $22/*-41/          {         LD     (BLOCK+6),HL}
  32.  
  33.           $DD/$21/*-51/      { LINE20: LD     IX,BLOCK    }
  34.           $DD/$66/1/         {         LD     H,(IX+1)    }
  35.           $DD/$6E/3/         {         LD     L,(IX+3)    }
  36.           $AF/               {         XOR    A           }
  37.           $CD/*+34/          {         CALL   SETRST      }
  38.           $2A/*-64/          {         LD     HL,(BLOCK)  }
  39.           $ED/$5B/*-64/      {         LD     DE,(BLOCK+4)}
  40.           $19/               {         ADD    HL,DE       }
  41.           $22/*-72/          {         LD     (BLOCK),HL  }
  42.           $2A/*-73/          {         LD     HL,(BLOCK+2)}
  43.           $ED/$5B/*-73/      {         LD     DE,(BLOCK+6)}
  44.           $19/               {         ADD    HL,DE       }
  45.           $22/*-81/          {         LD     (BLOCK+2),HL}
  46.           $3A/*-78/          {         LD     A,(BLOCK+8) }
  47.           $3D/               {         DEC    A           }
  48.           $32/*-82/          {         LD     (BLOCK+8),A }
  49.           $20/$D3/           {         JR     NZ,LINE20   }
  50.           $C9/               {         RET                }
  51.  
  52.           $F5/               { SETRST: PUSH   AF          }
  53.           $5C/               {         LD     E,H         }
  54.           $7D/               {         LD     A,L         }
  55.           $CB/$3B/           {         SRL    E           }
  56.           $16/0/             {         LD     D,0         }
  57.           $30/1/             {         JR     NC,SET10    }
  58.           $14/               {         INC    D           }
  59.  
  60.           6/$FF/             { SET10:  LD     B,0FFH      }
  61.           4/                 { SET20:  INC    B           }
  62.           $D6/3/             {         SUB    3           }
  63.           $F2/*-4/           {         JP     P,SET20     }
  64.           $C6/3/             {         ADD    A,3         }
  65.           7/                 {         RLCA               }
  66.           $82/               {         ADD    A,D         }
  67.           $4F/               {         LD     C,A         }
  68.           $68/               {         LD     L,B         }
  69.           $26/0/             {         LD     H,0         }
  70.           6/6/               {         LD     B,6         }
  71.  
  72.           $29/               { SET30:  ADD    HL,HL       }
  73.           $10/$FD/           {         DJNZ   SET30       }
  74.           $16/0/             {         LD     D,0         }
  75.           $19/               {         ADD    HL,DE       }
  76.           $11/0/$F0/         {         LD     DE,0F000H   }
  77.           $19/               {         ADD    HL,DE       }
  78.           6/0/               {         LD     B,0         }
  79.           $F1/               {         POP    AF          }
  80.           $B7/               {         OR     A           }
  81.           $20/$0C/           {         JR     NZ,RESET    }
  82.           $DD/$21/*+22/      {         LD     IX,MASK     }
  83.           $DD/9/             {         ADD    IX,BC       }
  84.           $7E/               {         LD     A,(HL)      }
  85.           $DD/$B6/0/         {         OR     (IX)        }
  86.  
  87.           $77/               { SET36:  LD     (HL),A      }
  88.           $C9/               {         RET                }
  89.  
  90.           $DD/$21/*+16/      { RESET:  LD     IX,MASK1    }
  91.           $DD/9/             {         ADD    IX,BC       }
  92.           $7E/               {         LD     A,(HL)      }
  93.           $DD/$A6/0/         {         AND    (IX)        }
  94.           $18/$F2/           {         JR     SET36       }
  95.  
  96.           $81/               { MASK:   DEFB   81H         }
  97.           $82/               {         DEFB   82H         }
  98.           $84/               {         DEFB   84H         }
  99.           $88/               {         DEFB   88H         }
  100.           $90/               {         DEFB   90H         }
  101.           $A0/               {         DEFB   0A0H        }
  102.  
  103.           $FE/               { MASK1:  DEFB   0FEH        }
  104.           $FD/               {         DEFB   0FDH        }
  105.           $FB/               {         DEFB   0FBH        }
  106.           $F7/               {         DEFB   0F7H        }
  107.           $EF/               {         DEFB   0EFH        }
  108.           $DF);              {         DEFB   0DFH        }
  109. end; {procedure draw}
  110.