English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 22 April 2019, 23:52   #1
robsoft
Registered User

robsoft's Avatar
 
Join Date: May 2018
Location: Chester, UK
Posts: 15
Is the initial shell a console.device that you can access?

Hey folks, apologies in advance if this is a dumb question that should have been super-obvious...!

Imagine I've booted an Amiga up without any kind of final 'loadwb', so I've got a normal shell prompt from which I can execute commands etc.

Does that default shell function as a 'console.device'?

I mean, is it possible to have a program that you launch from within that prompt eg '1>myprog.exe' and have that program send ANSI codes back to the shell from which it was launched?
robsoft is offline  
Old 23 April 2019, 00:05   #2
Niklas
Registered User

 
Join Date: Apr 2018
Location: Stockholm / Sweden
Posts: 47
What are you trying to do? A normal printf() can be used to write text, and also ANSI codes, to the console.
Niklas is offline  
Old 23 April 2019, 00:17   #3
robsoft
Registered User

robsoft's Avatar
 
Join Date: May 2018
Location: Chester, UK
Posts: 15
Ah, I'm doing something dumb then. In assembler, I've tried sending ANSI codes back through the simple dos.library 'write' call from a crude 'hello world' kind of thing. Tabs, returns etc seemed to work but not ANSI control codes (*Esc[4;5H* type stuff).

The problem is possibly between the chair and the keyboard, if you can do it from printf() then I'm happy it's me that's screwed this up in assembler. Thanks!
robsoft is offline  
Old 23 April 2019, 00:33   #4
Niklas
Registered User

 
Join Date: Apr 2018
Location: Stockholm / Sweden
Posts: 47
Can you try to put your ANSI control codes in a text file, and then simply do "type file" and see if the ANSI comes out ok?

The console can be in one of two modes, CON and RAW, and I think there are some ANSI codes that only work in RAW mode. It is described on page 218 and onward in the AmigaDOS manual (https://www.pagetable.com/docs/amiga...dos_manual.pdf). You can also toggle the screen mode from CON to RAW and back, using the ACTION_SCREEN_MODE packet (http://amigadev.elowar.com/read/ADCD.../node0065.html).
Niklas is offline  
Old 23 April 2019, 00:55   #5
robsoft
Registered User

robsoft's Avatar
 
Join Date: May 2018
Location: Chester, UK
Posts: 15
Ha ha, well it would have helped massively if I'd been following the code for Esc (27) with the correct code for the '[' character etc.... :-)

My bad, thanks for your encouragement. I've got it moving the cursor around and outputting in bold, using the other system colours for text etc. All good now!
robsoft is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Executables and initial register values copse Coders. General 6 01 January 2014 21:09
Access CD32-NVRam from Shell Retro1234 support.Other 3 08 August 2010 11:50
Clear background color for Shell window- Shell-StartUp fc.studio support.Apps 12 29 December 2009 14:21
Best games by initial letter alkis21 Nostalgia & memories 80 18 January 2008 23:32
1230scsi.device Access Fault???? CFOU! support.Hardware 8 03 September 2006 15:43

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.06113 seconds with 13 queries