On 10/27/2019 12:43 PM, Randall Gellens wrote:
On Sunday, October 21, 2018 at 12:15:30 AM UTC-7, Hans Vlems wrote:
So SAFE in NEWP identifies parts of code that are in assembly language?
In C the term usually indicates improper use of pointer variables. Thiat language is very generous in offering options with unexpected side effects when using pointers.
NEWP Opens the door to machine language instructions but the programmer always has to open that door knowingly, right?
Hans
Unsafe constructs were provisions that allowed one to do things that system software needed, such as pausing other processors, altering a stack, etc. These were accomplished using language constructs rather than machine operators.
The old Programmer's Workbench editor allowed one to put the cursor on a source code line and use the "]" command to view the generated machine code. I used to do that fairly often when I was optimizing code. It didn't let you change the generated
code, but you could change your source code to coax the compiler into generating the machine code you wanted.
It was news to me that Programmer's Workbench has this feature, but
after trying, I can't see how it could work. To me, PWB is the editor
for the MCP that has a Windows GUI client, and is also known as NX/EDIT.
It's been around (as a product available to users) since the late 1990s.
What I think Randy is describing is The Editor, or OBJECT/ED, originally written by Darryl High for the TD/MT/ET/T27 poll-select terminals. It is usually run from CANDE by means of the "U ED" command. It's been around
since ca. 1980.
Indeed, The Editor does use "]" commands and does allow you to view the generated object code for a program, interleaved with the source code
lines, in much the same way that compilers show generated code when the
$CODE option is set. I still use this quite frequently -- most recently
last week -- when debugging or trying to understand what code the
compiler generates.
For those who are unfamiliar with it, The Editor operates mostly in
forms mode and makes use of several of the more unusual features of the Burroughs TD-style terminals, including the SPCFY (specify) key. It is a full-screen, dumb-terminal WYSIWYG editor in somewhat the same way that
vi and emacs are, but since the TD-style terminals are block mode
devices instead of async character-at-a-time devices, The Editor does
not see individual keystrokes. Instead, it "offers" lines of the source
as unprotected fields on the form (usually one line at a time), you use
the local insert/delete/overtype features of the terminal to do line
editing, and transmit the updated line or lines to the host where The
Editor program is running. The interface is an acquired taste, but works
very nicely once you get used to it. It's far more capable than CANDE
page mode.
I originally got interested in The Editor because it has very nice
support for creating and editing patch files while presenting a unified
view of the base source and the patch. That feature has since been
carried forward into PWB and the other modern GUI editors for the MCP.
These days I tend to use PWB for everyday editing, but still fall back
to The Editor when I need to do something that no other MCP editor supports.
Brief instructions for using The Editor to view object code are:
1. Get the source file in CANDE.
2. Run The Editor: transmit "U ED".
3. Make sure a line on the screen is offered as an unprotected field.
The top (command) line will be offered initially. You can also position
the cursor over the text of any other line and press SPCFY.
4. Load the object code file. There are two options:
a. If the code file exists, load it by clearing the offered line and
entering "]LOAD CODE <file title>". The "]" is optional on the
command line.
b. If the code file does not exist, you can compile it as a workfile
by entering "]COMP".
5. View the object code by entering "]LISTCODE". You can start the code
listing at a specific point by entering "]LISTCODE <seq number>".
6. Page forward through the code list by pressing SPCFY. Paging
backwards is not supported.
7. The list will stop automatically after the end of the current code
segment. You can stop earlier by simply transmitting anything except SPCFY.
8. Quit The Editor with a "]END" command.
"]LISTCODE" can be abbreviated "]LISTC" and "]LOAD CODE" can be
abbreviated "]LOAD C". For more details, enter "]HELP LISTCODE".
I presented a tutorial on The Editor at the 2013 Universe/UNITE
conference. It describes the idiosyncratic user interface and discusses
several of its major features, including code listing:
http://www.digm.com/UNITE/2013/
Paul
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)