From 5aca46a059328a54246f3324ed36b478665ba91c Mon Sep 17 00:00:00 2001 From: jede Date: Sat, 11 Mar 2023 00:03:59 +0100 Subject: [PATCH] fix doc --- .gitignore | 3 ++- docs/api/pbar-lib.md | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a2e9f97..521a3eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.o -*.lib \ No newline at end of file +*.lib +build/ \ No newline at end of file diff --git a/docs/api/pbar-lib.md b/docs/api/pbar-lib.md index 71439b9..f0f8b9f 100644 --- a/docs/api/pbar-lib.md +++ b/docs/api/pbar-lib.md @@ -8,16 +8,26 @@ oricproject/$ mkdir libs oricproject/$ cd libs && curl http://repo.orix.oric.org/dists/2023.1/tgz/6502/pbar-lib.tgz oricproject/$tar xvfz http://repo.orix.oric.org/dists/2023.1/tgz/6502/pbar-lib.tgz +And build your program + +cl65 -ttelestrat myprogram.c libs/lib8/pbar.lib -o pbar + +## Functions + +### pbarInit + "struct pbar *pbarInit(unsigned char pbartype)" returns a pbar ptr struct (a malloc to the Orix kernel), arg is the type of the pbar, for instance one pbar type is available -pbarRun display the next percentage and the next char for the progressbar. Each type the pbarRun is called, the bar add "3%" to the current percentage. +### pbarRun + +"void pbarRun(unsigned char step, struct pbar *ptr)" displays the next percentage and the next char for the progressbar. Each type the pbarRun is "called, the bar add "3%" to the current percentage. + Step arg is not used yet. pbarRun must be called 34 times to have almost the complete bar. pbarEnd will displays 100% and will free pbar struct. -* void pbarRun(unsigned char step, struct pbar *ptr); +### pbarEnd -pbarEnd finishes the bar and free the pbar ptr +"void pbarEnd(struct pbar *ptr);" finishes the bar and free the pbar ptr -* void pbarEnd(struct pbar *ptr);* ## information in ASM