{"id":427,"date":"2021-08-19T10:35:50","date_gmt":"2021-08-19T08:35:50","guid":{"rendered":"https:\/\/automatico.freevar.com\/?page_id=427"},"modified":"2021-09-26T13:25:49","modified_gmt":"2021-09-26T11:25:49","slug":"libg","status":"publish","type":"page","link":"https:\/\/automatico.freevar.com\/index.php\/cp-m-80-2\/hitech-c-per-z80\/librerie\/libg\/","title":{"rendered":"LIBG"},"content":{"rendered":"<p><span style=\"font-size: 14pt;\">This library collects invocations to primitive FabGL subroutines for easier use.<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">Below are the individual modules to be filled in individually and then linked in the LIBG.LIB library<\/span><\/p>\n<pre class=\"brush: cpp; title: gbrush.c; notranslate\" title=\"gbrush.c\">\r\n\/* gbrush.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngbrush(r, g, b)\r\nint r,g,b;\r\n{\r\n      printf(&quot;%c_GBRUSH%u;%u;%u$&quot;,27,r,g,b);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gclear.c; notranslate\" title=\"gclear.c\">\r\n\/* gclear.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngclear(void)\r\n{\r\n      printf(&quot;%c_GCLEAR$&quot;,27);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gclrterm.c; notranslate\" title=\"gclrterm.c\">\r\n\/* gclrterm.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngclrterm()\r\nvoid;\r\n{\r\n      printf(&quot;%c_B$&quot;,27);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gcursoff.c; notranslate\" title=\"gcursoff.c\">\r\n\/* gcursoff.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngcursoff(void)\r\n{\r\n      printf(&quot;%c_E0$&quot;,27);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gcurson.c; notranslate\" title=\"gcurson.c\">\r\n\/* gcurson.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngcurson(void)\r\n{\r\n      printf(&quot;%c_E1$&quot;,27);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gellipse.c; notranslate\" title=\"gellipse.c\">\r\n\/* gellipse.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngellipse(x1, y1, w, h)\r\nint x1,y1,w, h;\r\n{\r\n      printf(&quot;%c_GELLIPSE%u;%u;%u;%u$&quot;,27,x1,y1,w,h);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gfillelp.c; notranslate\" title=\"gfillelp.c\">\r\n\/* gfillelp.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngfillelp(x1, y1, w, h)\r\nint x1,y1,w,h;\r\n{\r\n      printf(&quot;%c_GFILLELLIPSE%u;%u;%u;%u$&quot;,27,x1,y1,w,h);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gfillrec.c; notranslate\" title=\"gfillrec.c\">\r\n\/* gfillrec.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngfillrect(x1, y1, x2, y2)\r\nint x1,y1, x2, y2;\r\n{\r\n      printf(&quot;%c_GFILLRECT%u;%u;%u;%u$&quot;,27,x1,y1,x2,y2);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gpath.c; notranslate\" title=\"gpath.c\">\r\n\/* gpath.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngpath(punti)\r\nchar *punti;\r\n{\r\n      printf(&quot;%c_GPATH%s&quot;,27,punti);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gfillpth.c; notranslate\" title=\"gfillpth.c\">\r\n\/* gfillpth.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngfillpth(punti)\r\nchar *punti;\r\n{\r\n      printf(&quot;%c_GFILLPATH%s&quot;,27,punti);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gpixel.c; notranslate\" title=\"gpixel.c\">\r\n\/* gpixel.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngpixel(x, y)\r\nint x,y;\r\n{\r\n      printf(&quot;%c_GPIXEL%u;%u$&quot;,27,x,y);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: grect.c; notranslate\" title=\"grect.c\">\r\n\/* grect.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngrect(x1, y1, x2, y2)\r\nint x1, y1, x2, y2;\r\n{\r\n      printf(&quot;%c_GRECT%u;%u;%u;%u$&quot;,27,x1,y1,x2,y2);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gline.c; notranslate\" title=\"gline.c\">\r\n\/* gline.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngline(x1, y1, x2, y2, r, g, b)\r\nint x1,y1,x2,y2,r,g,b;\r\n{\r\n      printf(&quot;%c_GPEN%u;%u;%u$&quot;,27,r,g,b);\r\n      printf(&quot;%c_GLINE%u;%u;%u;%u$&quot;,27,x1,y1,x2,y2);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gscroll.c; notranslate\" title=\"gscroll.c\">\r\n\/* gscroll.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngscroll(x, y)\r\nint x,y;\r\n{\r\n      printf(&quot;%c_GSCROLL%u;%u$&quot;,27,x,y);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gpen.c; notranslate\" title=\"gpen.c\">\r\n\/* gpen.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngpen(r, g, b)\r\nint r,g,b;\r\n{\r\n      printf(&quot;%c_GPEN%u;%u;%u$&quot;,27,r,g,b);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gpoint.c; notranslate\" title=\"gpoint.c\">\r\n\/* gpoint.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngpixel(x, y, r, g, b)\r\nint x,y,r,g,b;\r\n{\r\n      printf(&quot;%c_GPEN%u;%u;%u$&quot;,27,r,g,b);\r\n      printf(&quot;%c_GPIXEL%u;%u$&quot;,27,x,y);\r\n}\r\n<\/pre>\n<pre class=\"brush: cpp; title: gdraw.c; notranslate\" title=\"gdraw.c\">\r\n\/* gdraw.c *\/\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n\r\nvoid\r\ngdraw(x1, y1, x2, y2)\r\nint x1,y1,x2,y2;\r\n{\r\n      printf(&quot;%c_GLINE%u;%u;%u;%u$&quot;,27,x1,y1,x2,y2);\r\n}\r\n<\/pre>\n<p>To facilitate the task of building the library, here are the compilation directives in SUBMIT form:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n;---------- LIBG.SUB ----------\r\nc -C -O gcurson.c\r\nc -C -O gcursoff.c\r\nc -C -O gpen.c\r\nc -C -O gpixel.c\r\nc -C -O gclear.c\r\nc -C -O gellipse.c\r\nc -C -O gfillelp.c\r\nc -C -O gpath.c\r\nc -C -O gfillpth.c\r\nc -C -O gscroll.c\r\nc -C -O gclrterm.c\r\nc -C -O gdraw.c\r\nc -C -O gbrush.c\r\nc -C -O grect.c\r\nc -C -O gfillrect.c\r\nc -C -O gline.c\r\nc -C -O gpoint.c\r\nLIBR R LIBG.LIB gcurson.OBJ\r\nLIBR R LIBG.LIB gcursoff.OBJ\r\nLIBR R LIBG.LIB gpen.OBJ\r\nLIBR R LIBG.LIB gpixel.OBJ\r\nLIBR R LIBG.LIB gclear.OBJ\r\nLIBR R LIBG.LIB gellipse.OBJ\r\nLIBR R LIBG.LIB gfillelp.OBJ\r\nLIBR R LIBG.LIB gpath.OBJ\r\nLIBR R LIBG.LIB gfillpth.OBJ\r\nLIBR R LIBG.LIB gscroll.OBJ\r\nLIBR R LIBG.LIB gclrterm.OBJ\r\nLIBR R LIBG.LIB gdraw.OBJ\r\nLIBR R LIBG.LIB gbrush.OBJ\r\nLIBR R LIBG.LIB grect.OBJ\r\nLIBR R LIBG.LIB gfillrect.OBJ\r\nLIBR R LIBG.LIB gline.obj\r\nLIBR R LIBG.LIB gpoint.obj\r\n;---------- fine ----------\r\nLIBR M LIBG.LIB\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_427\" class=\"pvc_stats all  \" data-element-id=\"427\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/automatico.freevar.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This library collects invocations to primitive FabGL subroutines for easier use. Below are the individual modules to be filled in individually and then linked in the LIBG.LIB library \/* gbrush.c *\/ #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; void gbrush(r, g, b) int r,g,b; { printf(&quot;%c_GBRUSH%u;%u;%u$&quot;,27,r,g,b); } \/* gclear.c *\/ #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; void gclear(void) { printf(&quot;%c_GCLEAR$&quot;,27); [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_427\" class=\"pvc_stats all  \" data-element-id=\"427\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/automatico.freevar.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"parent":92,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-427","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/427"}],"collection":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/comments?post=427"}],"version-history":[{"count":23,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/427\/revisions"}],"predecessor-version":[{"id":729,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/427\/revisions\/729"}],"up":[{"embeddable":true,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/92"}],"wp:attachment":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/media?parent=427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}