From 45eb4a409b978247c6ed414828e71faa9f4dfb6c Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 28 Jan 2015 13:00:28 -0800 Subject: [PATCH 1/2] memset() now matches C library --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c22c67d..c136819 100644 --- a/README.md +++ b/README.md @@ -379,11 +379,11 @@ putc(char), puts(string), home, gotoxy(x,y), getc() and gets() are other handy u puts(@okstr) ``` -memset(addr, len, val) will fill memory with a 16 bit value. memcpy(dstaddr, srcaddr, len) will copy memory from one address to another, taking care to copy in the proper direction. +memset(addr, val, len) will fill memory with a 16 bit value. memcpy(dstaddr, srcaddr, len) will copy memory from one address to another, taking care to copy in the proper direction. ``` byte nullstr[] = "" - memset(strlinbuf, maxfill * 2, @nullstr) // fill line buff with pointer to null string + memset(strlinbuf, @nullstr, maxfill * 2) // fill line buff with pointer to null string memcpy(scrnptr, strptr + ofst + 1, numchars) ``` From 81218d661c6c817e4a265c503c57647754677d80 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Wed, 28 Jan 2015 13:03:52 -0800 Subject: [PATCH 2/2] strlib -> cmdsys --- doc/User Manual.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/User Manual.md b/doc/User Manual.md index 4ef291d..dcf1296 100644 --- a/doc/User Manual.md +++ b/doc/User Manual.md @@ -11,7 +11,7 @@ To keep development compartmentalized and easily managed, PLASMA uses relatively To start things off, here is the standard introductory program: ``` -import stdlib +import cmdsys predef puts end @@ -62,7 +62,7 @@ The beginning of the source file is the best place for certain declarations. Thi Module dependencies will direct the loader to make sure these modules are loaded first, thus resolving any outstanding references. A module dependency is declared with the `import` statement block with predefined function and data definitions. The `import` block is completed with an `end`. An example: ``` -import stdlib +import cmdsys const reshgr1 = $0004 predef putc, puts, getc, gets, cls, gotoxy end @@ -90,7 +90,7 @@ These constants can be used in expressions just like a variable name. #### Structure Declarations There is a shortcut for defining constant offsets into structures: ``` -struc s_entry +struc t_entry word id byte[32] name word next_entry @@ -98,7 +98,7 @@ end ``` is equivalent to: ``` -const s_entry = 36 // size of the structure +const t_entry = 36 // size of the structure const id = 0 // offset to id element const name = 2 // offset to name element const next_entry = 34 // offset to next_entry element