/***************************************************/ /* COP libray based on the NexT Byte Codes library */ /***************************************************/ #define LCD_LINE8 0 #define LCD_LINE7 8 #define LCD_LINE6 16 #define LCD_LINE5 24 #define LCD_LINE4 32 #define LCD_LINE3 40 #define LCD_LINE2 48 #define LCD_LINE1 56 /**/ /**/ /**/ /**************************************/ /* This function reinilize the screen */ /**************************************/ void COP_SetScreenMode(void) { inline "dseg segment"; inline "SCM TSetScreenMode"; inline "dseg ends"; inline "set SCM.ScreenMode, 0"; inline "syscall SetScreenMode, SCM"; } /**/ /**/ /**/ /******************************************/ /* this function displays a string (x,y) */ /******************************************/ void COP_DrawText(int x, int y,char *string) { inline "dseg segment"; inline "DT TDrawText"; inline "dseg ends"; inline "mov DT.Location.X, COP_DrawText_x"; inline "mov DT.Location.Y, COP_DrawText_y"; inline "set DT.Options, 1"; inline "mov DT.Text, COP_DrawText_string"; inline "syscall DrawText, DT"; } /**/ /**/ /**/ /******************************************/ /* this function displays a string (x,y) */ /* and clear the screen first optionnaly */ /******************************************/ COP_TextOut(sint x, sint y, long cls, char *text) { inline "TextOut(COP_TextOut_x,COP_TextOut_y,COP_TextOut_cls,COP_TextOut_text)"; } /**/ /**/ /**/ /******************************************/ /* this function displays a number (x,y) */ /* and clear the screen first optionnaly */ /******************************************/ COP_NumOut(sint x, sint y, long cls,slong number) { inline "NumOut(COP_NumOut_x,COP_NumOut_y,COP_NumOut_cls,COP_NumOut_number)"; } /**/ /**/ /**/ /******************************************/ /* this function draw a point (x,y) */ /* and clear the screen first optionnaly */ /******************************************/ COP_PointOut(sint x, sint y,long cls) { inline "PointOut(COP_PointOut_x,COP_PointOut_y,COP_PointOut_cls)"; } /**/ /**/ /**/ /******************************************/ /* this function draw a line (x1,y1,x2,y2)*/ /* and clear the screen first optionnaly */ /******************************************/ COP_LineOut(sint x1, sint y1, sint x2, sint y2, long cls) { inline "LineOut(COP_LineOut_x1,COP_LineOut_y1,COP_LineOut_x2,COP_LineOut_y2,COP_LineOut_cls)"; } /**/ /**/ /**/ /******************************************/ /* this function draw a rectangle (x,y) */ /* and clear the screen first optionnaly */ /******************************************/ COP_RectOut(sint x, sint y, sint width, sint height, long cls) { inline "RectOut(COP_RectOut_x,COP_RectOut_y,COP_RectOut_width,COP_RectOut_height,COP_RectOut_cls)"; } /**/ /**/ /**/ /******************************************/ /* this function draw a circle (x,y,R) */ /* and clear the screen first optionnaly */ /******************************************/ COP_CircleOut(sint x, sint y, byte radius, long cls) { inline "CircleOut(COP_CircleOut_x,COP_CircleOut_y,COP_CircleOut_radius,COP_CircleOut_cls)"; }