Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 03:13 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Can you disable CTRL+C break?

     Page 1 of 2    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 07:30pm 13 Jan 2013
Copy link to clipboard 
Print this post

I know I keep comparing the MM to the Atari 8-bit home computers(such as the 800XL or the 130XE), and MM and the MM BASIC are not Atari's, but...

In the Atari, you could poke a memory location, to disable the BREAK key, preventing the user from stopping the running program. From what I remember, you could also poke another location, that would force a cold-boot if RESET was pressed.(the default on pressing RESET was a warm-start).

Is there any way to stop users breaking into the BASIC program?

I am currently looking VERY closely at CircuitGizmo's little keyboard interface chip thing, as this would allow a custom keyboard to be connected to the MM, effectively preventing the pressing of CTRL+C, but also wondering if there is any other way other then ruling it out via hardware.
Smoke makes things work. When the smoke gets out, it stops!
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 10:29am 14 Jan 2013
Copy link to clipboard 
Print this post

Hi,

I have the same needs. I'm testing MM in a academic enviroment where MM is an integral part of testing equipments controlled by trained operators. They have to fill some kind of forms first before testing starts. If they accidentaly press Ctrl-C (instead ie. ShiftC) the program stops. Using the "Continue" command does not always work . This happens from time to time and it is really annoying for supervisors.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3167
Posted: 11:11am 14 Jan 2013
Copy link to clipboard 
Print this post

OK, I give in. I will put a YAO (Yet Another Option) to disable CtrlC into 4.3 (due out soon). But be warned, without CtrlC the only way to break out of a running program will be to cycle the power.

Geoff
Geoff Graham - http://geoffg.net
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 11:52am 14 Jan 2013
Copy link to clipboard 
Print this post

Please don't disable Ctrl c. It works fine . Power cycle won't help me.
Andrew Rich VK4TEC
www.tech-software.net
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 12:24pm 14 Jan 2013
Copy link to clipboard 
Print this post

Hi,

no one wants to disable Ctrl-C pernamently. I suggest to add a command "CtrlC disable/enable" which should work for both us.

Regards
 
rambo55
Newbie

Joined: 11/12/2012
Location: Australia
Posts: 15
Posted: 01:25pm 14 Jan 2013
Copy link to clipboard 
Print this post

Please Do not disable the ctrl cEdited by rambo55 2013-01-15
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 01:41pm 14 Jan 2013
Copy link to clipboard 
Print this post

Guys:

This isn't a change that Ctrl-C will never ever work.

It is a BASIC command to turn it on or off.

Something like:

OPTION CTRLC ON

and

OPTION CTRLC OFF

Valid during program run. Put it at the beginning of your program and you cannot use Ctrl-C to break out of that program.

If you don't like it, default is that Ctrl-C works as before.

Micromites and Maximites! - Beginning Maximite
 
TinkersALot
Regular Member

Joined: 20/11/2012
Location: United States
Posts: 72
Posted: 01:57pm 14 Jan 2013
Copy link to clipboard 
Print this post

me thinks Geoffg would be well served to teach some of us to fish inside the mm-code-pool, but to keep the forces of entropy at bay, Geoffg must still be kingfisher among the throng.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 02:00pm 14 Jan 2013
Copy link to clipboard 
Print this post

"Geoffg must still be kingfisher among the throng"

Amen.
Micromites and Maximites! - Beginning Maximite
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:12pm 14 Jan 2013
Copy link to clipboard 
Print this post

My old (OSI superboard) computer with Microsoft Basic in 8K rom used to have a location in RAM to poke to which could enable/disable ctrl-c.

I wonder, could the poke function be extended to perform the ctrl-c on/off?


David M.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 02:19pm 14 Jan 2013
Copy link to clipboard 
Print this post

An option to disable CTRL+C for the currently running BASIC program would be a real advantage, and if you did the same thing with the Atari(here I go again - sorry!), yes, you would have to reset the computer to get the command prompt back again.

Poke another location, and I am pretty sure you could disable the RESET button too, so that reset or break both would not work, and you HAD to cycle power.

This kind of lockout does not suit everyone, as evidenced by the posts above from other members here shocked at that idea they might lose their CTRL+C, which was never my intention - only to be able to switch it off if you don't want the user to have that ability.

The MM has really become something of a blast-from-the-past for me - so many similarities with the Atari I used to program in about 18 or so years ago...

I just wish my colour one would arrive(ordered on the 4th).
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 02:30pm 14 Jan 2013
Copy link to clipboard 
Print this post

WHILE I THINK OF IT - How come MM BASIC does not use the [BREAK] key on the keyboard to stop the program running?

...an ideal key choice, I would have thought...

However, there must be a reason, so I would love to know what that is.
Perhaps as simple as the fact that CTRL+C would have been used in the BASIC that MM is based on? Perhaps this was how you stopped programs running in MS BASIC or GW-BASIC etc back in the day?

...I never programmed in either of these.
Smoke makes things work. When the smoke gets out, it stops!
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 02:34pm 14 Jan 2013
Copy link to clipboard 
Print this post

  Grogster said  
I just wish my colour one would arrive(ordered on the 4th).


Ordered from me? 10 days to NZ would be quick. Ship time to NZ is 10 days minimum, 15 days typical.
Micromites and Maximites! - Beginning Maximite
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 02:39pm 14 Jan 2013
Copy link to clipboard 
Print this post

"Perhaps as simple as the fact that CTRL+C would have been used in the BASIC that MM is based on? Perhaps this was how you stopped programs running in MS BASIC or GW-BASIC etc back in the day?"

You are correct.
Micromites and Maximites! - Beginning Maximite
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 02:41pm 14 Jan 2013
Copy link to clipboard 
Print this post

No, but I think I should have.

Altronics in Australia, and I also paid $30 for 3-4 day delivery.
I've emailed them a couple of time to ask what has happened(as they would have the tracking number so I thought), but no answer.

I DID get one reply saying that they sent it on the 4th, and to let them know if it had not arrived by the 11th(which it didn't), so I did let them know, but have not as yet received any reply from them.

While I have your attention CG, and a slight digression, I don't suppose you can connect your PS2 keyboard chip thing to a standard computer?
I would expect not, as your chip obviously generates PS/2 codes fine, but probably would not respond to the PC trying to poll it to see if it has a keyboard connected - I understand that the initial communication between a PC and it's keyboard is relatively complicated...
Smoke makes things work. When the smoke gets out, it stops!
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 02:45pm 14 Jan 2013
Copy link to clipboard 
Print this post

  Grogster said  
While I have your attention CG, and a slight digression, I don't suppose you can connect your PS2 keyboard chip thing to a standard computer?
I would expect not, as your chip obviously generates PS/2 codes fine, but probably would not respond to the PC trying to poll it to see if it has a keyboard connected - I understand that the initial communication between a PC and it's keyboard is relatively complicated...


I should just test this and let you know.


Micromites and Maximites! - Beginning Maximite
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 02:53pm 14 Jan 2013
Copy link to clipboard 
Print this post

...and I digress again, but I started the thread, so...

I just see that chip being handy for PC control applications too, where you have a dedicated system. I used to hack a keyboard whenever I needed a custom keyboard.

You CAN get professional custom keyboard things where you can put some buttons on them, but they are very pricy, whereas your chip is nicely priced.
Smoke makes things work. When the smoke gets out, it stops!
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 02:54pm 14 Jan 2013
Copy link to clipboard 
Print this post

If I remember correctly the status of the boatloader/update button is available to MMBasic. If so, you could always disable ctrl - c as required but include in your program an interupt on the bootloader button to provide a 'programmed way' to end a program running rather than just cycling the power.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9082
Posted: 03:02pm 14 Jan 2013
Copy link to clipboard 
Print this post

Clever idea.
Smoke makes things work. When the smoke gets out, it stops!
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 04:20pm 14 Jan 2013
Copy link to clipboard 
Print this post

  CircuitGizmos said  
I should just test this and let you know.


No go, so far. Might work in conjunction WITH a keyboard (as it will do on the Maximite) but I have not tested that.
Micromites and Maximites! - Beginning Maximite
 
     Page 1 of 2    
Print this page
© JAQ Software 2024