Author Topic: Interesting Type-Ins.  (Read 9295 times)

0 Members and 1 Guest are viewing this topic.

Offline copychr$

  • Supporter
  • CPC664
  • *
  • Posts: 69
  • Country: ch
  • Liked: 14
  • Likes Given: 4
Copychr$ over the Top
« Reply #25 on: 16:08, 19 June 13 »
CAT.BAS, 3K is just that, a souped up CAT.

It will not modify anything in the file system, apart from copying or erasing itself on demand.
Things have been made as smooth as possible and there aren’t really any gotchas.

It’s both a Standalone and a Module. That use is described in the attached doc.
Best use is to have it on your working disks and copy it when desired on any disks you visit.
With 2 drives you just need one copy on any drive.

Here is the Help File to get an idea:
Code: [Select]
100 REM *** CATHELPE.BAS
110 MODE 2
120 '
130 PRINT "CAT.BAS offers repeat basic file access to users"
140 PRINT "of all levels of experience.":PRINT
150 PRINT "To get the most out of it please consult the documentation.":PRINT
160 PRINT "Arrow Keys and Joystick let you move the Highlight."
170 PRINT "All features are risk free and just one key press away.":PRINT
180 PRINT "X - Cycles through 4 Cat, Dir & Mode choices. Return selects."
190 PRINT "S - Saves Cat.Bas to current disc."
200 PRINT "E - Erases Cat.Bas from current disc."
210 PRINT "C - CAT and |DIR are repeated. You may swap discs anytime."
220 PRINT "Q - Quits program."
230 PRINT "Return or Fire Button 1 - RUNs Selection."
240 PRINT "L - LOADs Selection and sets f7 to LIST. Hit f7 then Return to view."
:PRINT
250 PRINT "Spacebar or Fire 2 - TOGGLEs Drives.":PRINT
260 PRINT "Control + A or B - RUNs Cat.Bas from Drive A or B"
270 PRINT "allowing you to indifferently work both Drives.":PRINT
280 PRINT "Any Key to continue...";:CALL &BB06:PRINT CHR$(11)
290 PRINT "Please note following changes when in use as a Module:"
300 PRINT "S - Selects the File Name to be returned."
310 PRINT "E - Not available."
320 PRINT "Q - Quits back to main program, no choice is made.":PRINT
330 PRINT "CATCALL.BAS can help you get a handle on Module use.":PRINT
340 PRINT "Pressing Control + A or B Keys will start CAT.BAS"
350 PRINT "Now...":PRINT
360 '
370 KEY 156,"RUN"+CHR$(34)+"A:CAT.BAS"+CHR$(13):KEY DEF 69,1,97,65,156 '^A
380 KEY 157,"RUN"+CHR$(34)+"B:CAT.BAS"+CHR$(13):KEY DEF 54,1,98,66,157 '^B

CAT.BAS
Full Listing in the doc. But this is some of what you get …

[attachimg=1]

The doc will get you up to speed, but you don’t need much more than the help file on the dsk.
Why not use this download link:  ftp://ftp.lip6.fr/pub/amstrad/misc/TYPEINS.ZIP
RUN”CAT and have a go.

On a real CPC:
Using only one drive, you will have to delete a file to get Cat.bas on that full typins.dsk.
Also set flag drive to fdr=1 in the first line to avoid error messages.
Pink (16) on blue (1) happens to be flicker-free and readable for mode 2.
Setting k1%=16 in Line 60040 will do it.

-------------------------------------------------------------------------------------
Please note a modification:
dsk file removed. All code is now in copychrs.dsk at foot of post #28.
« Last Edit: 18:25, 23 June 13 by copychr$ »

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.938
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3412
  • Likes Given: 6123
Re: Interesting Type-Ins.
« Reply #26 on: 21:56, 20 June 13 »
This is very appealing in a geeky way, but it needs to replace CAT in the ROM to be of much use...

Offline copychr$

  • Supporter
  • CPC664
  • *
  • Posts: 69
  • Country: ch
  • Liked: 14
  • Likes Given: 4
Re: Interesting Type-Ins.
« Reply #27 on: 14:35, 21 June 13 »
Thank you, Gryzor, and all who make it go, for providing a welcome here.

Also, thank you for the compliment.
That’s the nicest thing anybody ever said to me … geeky.
Makes me think of the girl with the coke bottle in Head First Java; “Wouldn’t it be dreamy if …”

I really don’t know a pig from a poke and that’s why things turned out this way.
Somehow cozy, like sitting around the fire after rubbing your sticks together.

As for keeping cats in roms, mine are both elderly and lack an eye and get about a lot :-)

I agree it would be slick to type or call CAT, even have a dedicated key and get something along these lines.
That’s very tempting, but beyond me.

As a primitive one should be content to rub one’s sticks.
Hey, let’s make torches and all go mess up the sacred cave! Yeah.
« Last Edit: 19:02, 23 June 13 by copychr$ »

Offline copychr$

  • Supporter
  • CPC664
  • *
  • Posts: 69
  • Country: ch
  • Liked: 14
  • Likes Given: 4
Copychr$ the Aftermath
« Reply #28 on: 15:38, 23 June 13 »
DOS.BAS 8K.

[attachimg=4]

DOS? Sure.

Everybody is standing around, going “Who can do sh*t like this?”
And sure enough, BG can do it … DOS for short.

That pun has caused a lot of confusion until today, as most professional computer journalists only interpret acronyms.
Nothing gets operated whatsoever, but one does a lot of the other.

Here Basic users also get to do some.
With the added comfort of selection by a flying cursor, both in CAT Screen and Menu and not a command line in sight …

That is a big claim and something will always be wrong or uncomfortable.
No, not bugs, that’s another misnomer. BUG stands for big user guide. One can be found in the Doc.

If you still code and get some jollies here, then all options can be rewritten to your taste.
I’d shy away from messing with the zooming about part though.
Information helpful to start coding that is available in the doc from post #24, and one can search for some other examples.

To a remarkable extent, only copychr$ was needed or used to make plain Basic bootstrap itself a working environment.

The process is so productive, because user selection of displayed information implies instant access for the working code.
There is no more need to retrieve from memory or file at that point.

Today, the same routine is exploited in the beta version of Google Glasses.
My memory has long gone, but they have a nice app that manages marital strife.

After staring at a female person for a few seconds, I am informed; “This is NOT your Wife.” or “This IS your Wife, her name is Optional.”
« Last Edit: 10:32, 24 June 13 by copychr$ »

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #29 on: 10:40, 08 April 14 »
I've been typing in and playing around with a few sound programs which included this one called Alto from AA64 which makes use of a Graphics Pen and the more difficult FILL command, however I have been able to come up with a BASIC 1.0 solution so the program appears to be functioning in the same manner.

Running this BASIC 1.0 program now in BASIC 1.1 appears to be just as functional as the original (despite being 2Kb larger), and in BASIC 1.0 everything appears normal, though the sound from the Notes seem to sound a little bit clipped, I'm unsure if it's due to the extra carry from the program or constraints from BASIC 1.0, this program is full of Arrays though and I've included another one for filling in the areas and it could easily be shortened down to each individual key pattern which is presented in the program.

Anyway I thought I'd include it in here along with the original for people to compare.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #30 on: 10:42, 24 June 14 »
Skycapers! Nice  :D  Looks like it came from one of those multi-platform mags...


I must of grabbed the scan of this particular program off CPC-Power when it was the old site and typed it in and posted it here while the site was down. It appears to have come from Computer & Video Games (or C+VG) from the mid-80s.
According to Wikipedia (which is contradicting itself), Future Publishing produce that magazine which began Nov 1981, though clicking on Future Publishing reveals they didn't start until 1985 with Amstrad Action. I can only assume that C+VG were subjected to Future Publishing at some stage during it's publication.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #31 on: 09:52, 04 January 15 »
This program was a little filler in the Type-Ins pages of AA65 which produces some interesting graphic patterns as it moves forwards & backwards on the screen.
Originally made use of "GRAPHICS PEN", it's so easy to convert for a 464, I must of missed the issue with the solution in it.  ;D


I was curious to see how this program would go in Pascal, and was able to produce something similar which runs a little bit faster which I'll post in the Pascal Thread.
« Last Edit: 10:09, 04 January 15 by AMSDOS »
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.938
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3412
  • Likes Given: 6123
Re: Interesting Type-Ins.
« Reply #32 on: 19:42, 06 January 15 »
Nice early gfx demo, just make sure you run it at 500%

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #33 on: 14:16, 24 May 15 »
Nice early gfx demo, just make sure you run it at 500%


Hmmm. I tried this 500% on my old WinXP computer in WinApe and my computer nearly had a seizure.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.938
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3412
  • Likes Given: 6123
Re: Interesting Type-Ins.
« Reply #34 on: 20:59, 24 May 15 »
Ahh poor thing it can't stand the Z80 power...

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #35 on: 13:21, 14 October 15 »
I came across this program a while ago, unfortunately I'm breaking my own rules because it's a RSX Library, lots of RSX Library programs come with commands, to allow easier access to the Firmware, but this one allows you to play around with Registers (Singular or Pair) & a RSX command FWCALL followed by Firmware Address. So a BASIC program with a lot of different commands, could be given a boost under this program or could be useful for a Lengthy Program which might have too much stuff in it for a BASIC compiler to deal with.


regiload &copy popular computing weekly (1987)
regiload &copy popular computing weekly (1987)
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #36 on: 09:37, 15 October 15 »
Well I couldn't resist typing in that program & found something to test it on. I have much to learn!  :o


I've attached some variations of the same program (Hypno-Strobe/Colour Fader), which is using a series of MOVE & DRAWR commands within a loop as well as a INK . Around that I've put a WHILE loop to check if Return has been pressed, program exits when this happens and resets INKs back to normal.


What's surprising is the BASIC result (HYPNO.BAS) is faster than Regiload (STROBE.BAS & STROBE2.BAS). In addition to the DRAWR command, a Graphics Pen is being used to alternate the colour, which initially had me setting the GRA PEN (&BBDE) for it throughout the loop. In STROBE2.BAS I've reduce the use of &BBDE, the result looks a little bit different, but still no faster than the BASIC! (both 1.0 or 1.1), which draws to the centre of the screen in around 8 seconds. STROBE.BAS & STROBE2.BAS do this in around 13-14secs!


In the original program, maths is being used with those MOVE & DRAWR commands. Perhaps that's slowing things down being in the RSX, though it's a big turnout, or maybe it's no better than what the program is currently using. I haven't disassembled the Regiload M/C to see what it's doing, it might be it's design and nature of it, which cannot be improved. I can test this with another program which directly sends RSXs to MOVE & Drawing Commands.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline Fessor

  • CPC6128
  • ****
  • Posts: 235
  • Country: de
  • Liked: 204
  • Likes Given: 46
Re: Interesting Type-Ins.
« Reply #37 on: 01:13, 16 October 15 »
it has to do with the circumstance that rsx cant be stored tokenized as basic-commands and the basic interpreter has to interpret each byte of the name of the rsx-command and compare it with the nametable of rsx-commands to look if this rsx-command is defined and where its entry-point is. also the parameters of the rsx are adressed and accessed via the index-registers. This makes the Parsing of RSX slower than parsing a Basic-Command which for the most common keywords is simply one byte.




Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1981
  • Likes Given: 4650
Re: Interesting Type-Ins.
« Reply #38 on: 02:11, 16 October 15 »
Positive an MC side is that you search for the address of the RSX once, store the address and then use the address.  :)  Maybe doable in BASIC too?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #39 on: 03:14, 16 October 15 »
Ok, so if RSXs are bad in interpreted BASIC, I guess a BASIC CALL with parameters would help smooth the process if a CALL gets tokenised.


Otherwise I've got some great results using RSXs by incorporating it into a Compiled Program.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.892
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1104
  • Likes Given: 1867
Re: Interesting Type-Ins.
« Reply #40 on: 13:32, 19 June 16 »

After AA discontinued the Type-ins from issue 109 onwards, the next best thing was the Basically basic page and in Issue 112 (January 1995), Angela Cook and Rob Buckley posted this fun little game of dodging the square meteors with your wire frame starship. :)


[attachimg=1]


I actually found a small bug in the program where, after a while all these square meteors appeared out of nowhere and you had no chance of dodging them. This program had typechecker codes in it, but they all seemed to match up, so the bug was present when the program got published.
I can't remember if I sorted this out back then, but I found the bug on Line 120, specifically this code:


Code: [Select]
bl3(aa)=0

which should read:


Code: [Select]
bl3(a)=0

Now this starfigher game is much more enjoyable. But it's quite well written, using BASIC functions MAX and MIN instead of IF statements to optimize this program, it also works in BASIC 1.0 with the use of PLOT to set the GRAPHICS PEN & it also sets the Control Code to set the Screen Write Mode to XOR.


When you run out of lives though the program ends and all this Character Garbage displays itself onscreen. BASIC 1.0 doesn't support CLEAR INPUT, so I've added a:


Code: [Select]
WHILE INKEY$<>"":WEND

which effectively does the same thing.



* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3