From c80d29c2ab74e270b86bdb2748cc7f3f08969f84 Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Sun, 5 Apr 2020 10:07:01 +0200 Subject: [PATCH 1/4] Add ATTR file --- docs/library/attr.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/library/attr.md diff --git a/docs/library/attr.md b/docs/library/attr.md new file mode 100644 index 000000000..8f80efa3b --- /dev/null +++ b/docs/library/attr.md @@ -0,0 +1,35 @@ +##Requirements + +ATTR is a library function to be included with the following command: + +``` +#include +``` + +##Description +`ATTR(row, col)` + +Returns the ATTR (color attribute) of the given screen coordinate at the given row and column. + + +##Sample usage + +``` +#include + +PRINT AT 9, 10;PAPER 4; "A" +LET s = ATTR$(9, 10) +PRINT AT 0, 0; "The attribute of screen position 9, 10 is "; s +``` + +##Remarks + +* This function extends the one in Sinclair BASIC (and it's compatible with it) since it also allows rows 22 and 23. + + + +##See also + +* [ CSRLIN ](../csrlin.md) +* [ POS](../pos.md) +* [ AT ](../at.md) From 92fb4f589bb6e40a19ae4a5968aa80453649609e Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Sun, 5 Apr 2020 10:09:02 +0200 Subject: [PATCH 2/4] Move POS to the library folder --- docs/at.md | 2 +- docs/csrlin.md | 2 +- docs/library.md | 2 +- docs/library/attr.md | 2 +- docs/{ => library}/pos.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename docs/{ => library}/pos.md (86%) diff --git a/docs/at.md b/docs/at.md index 52471ba1e..f6b5d10ac 100644 --- a/docs/at.md +++ b/docs/at.md @@ -15,5 +15,5 @@ It can be used both as a [PRINT modifier](print#modifiers.md) and a [variable de * [PRINT](print.md) * [DIM](dim.md) - Variable Declarations -* [POS](pos.md) +* [POS](library/pos.md) * [CSRLIN](csrlin.md) diff --git a/docs/csrlin.md b/docs/csrlin.md index 0fb9ccec5..76cce2ebf 100644 --- a/docs/csrlin.md +++ b/docs/csrlin.md @@ -24,5 +24,5 @@ CSRLIN is a library function to be included with the following command: ##See also -* [ POS](pos.md) +* [ POS](library/pos.md) * [ AT ](at.md) diff --git a/docs/library.md b/docs/library.md index 34626c77b..d6596f929 100644 --- a/docs/library.md +++ b/docs/library.md @@ -58,7 +58,7 @@ instead of just character positions. (20% faster per character, but much larger
Function to mirror the bits in a byte - the basis of printing, say a left facing sprite, if all you have are right facing graphics stored. -* [pos.bas](pos.md) +* [pos.bas](library/pos.md)
Function to get the current cursor horizontal co-ordinate. * [windowPaint.bas](library/windowpaint.md) diff --git a/docs/library/attr.md b/docs/library/attr.md index 8f80efa3b..3fddf96be 100644 --- a/docs/library/attr.md +++ b/docs/library/attr.md @@ -31,5 +31,5 @@ PRINT AT 0, 0; "The attribute of screen position 9, 10 is "; s ##See also * [ CSRLIN ](../csrlin.md) -* [ POS](../pos.md) +* [ POS](pos.md) * [ AT ](../at.md) diff --git a/docs/pos.md b/docs/library/pos.md similarity index 86% rename from docs/pos.md rename to docs/library/pos.md index fb4852375..9e6d9bbfe 100644 --- a/docs/pos.md +++ b/docs/library/pos.md @@ -16,5 +16,5 @@ POS is a library function to be included with the following directive: ##See also -* [ AT ](at.md) -* [ CSRLIN](csrlin.md) +* [ AT ](../at.md) +* [ CSRLIN](../csrlin.md) From a15fb55e01607d1cc23d91aebbe31673f8a894dd Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Sun, 5 Apr 2020 10:10:00 +0200 Subject: [PATCH 3/4] Move CSRLIN to the library folder --- docs/at.md | 2 +- docs/library.md | 2 +- docs/library/attr.md | 2 +- docs/{ => library}/csrlin.md | 4 ++-- docs/library/pos.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename docs/{ => library}/csrlin.md (88%) diff --git a/docs/at.md b/docs/at.md index f6b5d10ac..42c98682a 100644 --- a/docs/at.md +++ b/docs/at.md @@ -16,4 +16,4 @@ It can be used both as a [PRINT modifier](print#modifiers.md) and a [variable de * [PRINT](print.md) * [DIM](dim.md) - Variable Declarations * [POS](library/pos.md) -* [CSRLIN](csrlin.md) +* [CSRLIN](library/csrlin.md) diff --git a/docs/library.md b/docs/library.md index d6596f929..f92ede9f4 100644 --- a/docs/library.md +++ b/docs/library.md @@ -40,7 +40,7 @@ Here are some alternative functions using faster integer and fixed output. * [clearBox.bas](library/clearbox.md)
Sub to clear a subset of the screen - a window defined with a character box. -* [crslin.bas](csrlin.md) +* [crslin.bas](library/csrlin.md)
Function to get the current cursor vertical co-ordinate. * [fastPlot.bas](library/fastplot.md) diff --git a/docs/library/attr.md b/docs/library/attr.md index 3fddf96be..3171f6bb8 100644 --- a/docs/library/attr.md +++ b/docs/library/attr.md @@ -30,6 +30,6 @@ PRINT AT 0, 0; "The attribute of screen position 9, 10 is "; s ##See also -* [ CSRLIN ](../csrlin.md) +* [ CSRLIN ](csrlin.md) * [ POS](pos.md) * [ AT ](../at.md) diff --git a/docs/csrlin.md b/docs/library/csrlin.md similarity index 88% rename from docs/csrlin.md rename to docs/library/csrlin.md index 76cce2ebf..2dedc0da1 100644 --- a/docs/csrlin.md +++ b/docs/library/csrlin.md @@ -24,5 +24,5 @@ CSRLIN is a library function to be included with the following command: ##See also -* [ POS](library/pos.md) -* [ AT ](at.md) +* [ POS](pos.md) +* [ AT ](../at.md) diff --git a/docs/library/pos.md b/docs/library/pos.md index 9e6d9bbfe..5d5d83f97 100644 --- a/docs/library/pos.md +++ b/docs/library/pos.md @@ -17,4 +17,4 @@ POS is a library function to be included with the following directive: ##See also * [ AT ](../at.md) -* [ CSRLIN](../csrlin.md) +* [ CSRLIN](csrlin.md) From 4b585612e1dca823cfdde5526a77db8148a9765c Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Sun, 5 Apr 2020 10:11:05 +0200 Subject: [PATCH 4/4] Move SCREEN to the library directory --- docs/{ => library}/screen.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{ => library}/screen.md (100%) diff --git a/docs/screen.md b/docs/library/screen.md similarity index 100% rename from docs/screen.md rename to docs/library/screen.md