Slimelite BBS

Inkey_ADE.sh.txt

Back to gcc

INKEY$ function script for ADE.

Size
1.7K (1,754 bytes)
Added
2026-11-20 02:43
Downloads
2
Long Description
============================================================================ Architectures: Classic AMIGAs, FS-UAE and possibly WinUAE, Linux, MacOS. ------------------------------------------------------------------------ MINIMUM Requirements Are:- -------------------------- Stock A1200, 4MB Fastram and HDD. FS-UAE 2.8.1, minimum. Standard OS 3.0.x install or better. Full ADE UNIX environment install, (full install on AMINET): https://aminet.net/package/dev/gcc/ADE Library file ixnet.library version 48.0 Library file ixemul.library version 48.0 Both files are here if you have NOT got them: https://aminet.net/package/util/libs/ixemul-48.0 (It might even work under WinUAE and CygWin but it is untested so you use it at your own risk, see 'The Legal Stuff:-' below.) ---------------------------------------------------------------------------- History:- --------- 01-01-2023. ----------- Version 1.00.00. Probably the one and only upload for this archive. ---------------------------------------------------------------------------- General:- --------- Consider this the MNAUAL too! ----------------------------- (Apologies for any typos, etc...) (This is a WORKING, USEFUL, FUN piece of code, treat it as such.) As some of you may have discovered I am uploading code snippets that do things non-standard in various AMIGA modes, this mode being the ADE *NIX package. This upload is yet another for ADE the *NIX _emulator_. It is an ASCII only, fully POSIX compliant, pseudo-INKEY$ function that waits/loops for a quick, single, keypress which in this DEMO is displayed on screen. As the ADE ksh[88] shell does NOT have the single keypress extensions for keyboard input like bash's "read" command for example then this is an alternative HACK to do a similar task. There are two methods to exit the Inkey_ADE.sh DEMO code: 1) The uppercase 'Q' to quit the code normally with a return code of 0. 2) The 'Esc' key with a return code of 1. Just download Inkey_ADE.sh.txt, rename to Inkey_ADE.sh and place inside your 'ADE' /home/<drawer> of your choice. Start up ADE and navigate to your <drawer> of choice and run the script from the prompt as:- ./Inkey_ADE.sh<CR> Where <CR> is the RETURN/ENTER key and away you go. (NOTE: chmod 755 Inkey_ADE.sh<CR> should not be required for ADE.) The only important part is the function itself and how to call it. Read the code for more information. ---------------------------------------------------------------------------- What to expect:- ---------------- INKEY$ for ADE. Read the code for more information! Just momentarily press an ASCII key only and it will display on screen... Press Q, (uppercase), to quit, (the RETURN/ENTER key is not needed)... You pressed:- B _ ============================================================================ INKEY$ for ADE. Read the code for more information! Just momentarily press an ASCII key only and it will display on screen... Press Q, (uppercase), to quit, (the RETURN/ENTER key is not needed)... You pressed the 'Esc' key, now exiting the program with a return code of 1! <your_command_prompt> _ ---------------------------------------------------------------------------- Shells tested on:- ------------------ 1) AmigaShell running ADE's ksh/sh. 2) Almost ANY *NIX OS 'sh', 'dash', 'bash', 'ksh' and 'zsh'. Enjoy... Bazza... ---------------------------------------------------------------------------- Lincolnshire Amiga Group: https://lincsamiga.org.uk/wordpress/ ---------------------------------------------------------------------------- This archive is issued under the CC0 Licence. Public Domain. ---------------------------------------------------------------------------- IMPORTANT:-