: TEST 10 0 DO CR ." Hello " LOOP ;
Group: http://groups.google.com/group/ibm1130/topics
- Small assembler program [11 Updates]
John Doty <j...@noqsi.com> Jan 22 07:26AM -0700
On Jan 21, 2014, at 7:21 PM, Bob Flanders wrote:
> I saw your web site... you did FORTH. You (probably already) know
> where that name comes from?
> IBM 1130 was the first FORTH interpreter.
Yep. The classic FORTH model of arithmetic comes from the 1130: product of two cells is a double cell, dividends are double while divisors are single, ...
My little stripped-down portable FORTH will be taking a ride to an asteroid in a couple of years!
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com
John Doty <j...@noqsi.com> Jan 22 07:53AM -0700
On Jan 21, 2014, at 5:02 PM, Bob Flanders wrote:
> 1. I did some testing and I the FILE statement is not needed. When reading the Monitor document, I was thinking that the FILE statement, when referenced by the *FILES(FILE1,,) command without a file name would save the address of working storage in WSSCT. It didn't. I checked this by adding a DUMP command right after start and dumping the program WSSCT remained zero.
I believe FILE is there to emulate FORTRAN's "DEFINE FILE" statement so that you can share data in WS between FORTRAN and assembly language programs. I don't recall I ever used it. You might find "DSA" more useful: it'll give you the sector address of a named file.
Note how strange this is from a modern perspective: "DSA" makes the *linker* responsible for "opening" a disk file!
> Finally, when reading DISK1, I was surprised at the spaghetti and self-modifiction techniques. I shouldn't have been. They used every trick to save space and make it as fast as possible.
"Structured programming" hadn't been invented back then. Self modification was pretty common, a practice left over from first generation hardware, although the 1130 had most of the features (such as index registers and indirect addressing) that made that unnecessary. But then there was the BSI instruction.
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com
"Richard Stofer" <rst...@pacbell.net> Jan 22 08:23AM -0800
"Elements of IBM 1130 Programming" by Winston T. Price is ALL about assembly
level programming. Fortran is only mentioned in passing on page 36.
http://www.alibris.com/Elements-of-IBM-1130-programming-Wilson-T-Price/book/
2000997?matches=5
<http://www.alibris.com/Elements-of-IBM-1130-programming-Wilson-T-Price/book
/2000997?matches=5&cm_sp=works*listing*title> &cm_sp=works*listing*title
Richard
From: ibm...@googlegroups.com [mailto:ibm...@googlegroups.com] On Behalf
Of Bob Flanders
Sent: Tuesday, January 21, 2014 5:41 PM
To: ibm...@googlegroups.com
Subject: Re: [IBM1130] Re: Small assembler program
That's a cool feature.I don't know if the emulator can do that.
To clear (or change) WS, you could use DUP and do a *STOREDATA to put cards
images in WS.
I think you are right about DISK1. It does an XIO then goes to D1150 .. no
looping waiting for IO to complete. That means you could call to write... do
some other stuff then check if it's done. Or just test before calling the
routine. I wonder if it would get upset if you called to write then returned
to monitor.
I'm amazed at how much information is missing from the 1130 docs, at least
for assembler. You have to read the docs very carefully, or you can miss
vital information. Sometimes, information is not in the place you expect.
Over the years, I bought some books... Programming the IBM 1130 by Hughes
and Programming the 1130 and 1800 by Louden. Both are mainly Fortran books.
What assembler they have says nothing about writing to disk. Now I think I
know why the authors didn't try to write about it.
Bob
Bob Flanders <bob.fl...@gmail.com> Jan 22 11:44AM -0500
The funny thing is, you can't write to any already-defined file unless
you use DISKZ. all files are in the File Protected Area of the disk
for DISKN and DISK1.
Very cool about going to comet. Can you encode a hex 'BOBF' in the
program somewhere so I can ride along? ;)
Bob
John McKee <jmm...@flinthills.com> Jan 22 10:53AM -0600
What I dimly remember is that DISKN allowed for multiple sectors to be
transferred at one time. Beyond that, what is the point to using DISKN or
DISK1 if they can't write to defined files? Does the restriction only
apply to previously created files?
John McKee
Bob Flanders <bob.fl...@gmail.com> Jan 22 11:59AM -0500
Richard,
Thank you! I just ordered a copy.
Bob
Bob Flanders <bob.fl...@gmail.com> Jan 22 12:01PM -0500
I think that IBM figured if you want to write to existing file, do so
at your own risk and use DISKZ. Then file, DSA, etc become valuable,
but know what you are doing. If you only need scratch space, use DISKN
or DISK1.
John Doty <j...@noqsi.com> Jan 22 12:29PM -0700
On Jan 22, 2014, at 9:44 AM, Bob Flanders wrote:
> The funny thing is, you can't write to any already-defined file unless
> you use DISKZ. all files are in the File Protected Area of the disk
> for DISKN and DISK1.
// JOB T
Then you can create an unprotected temporary file with DUP's DFILE.
> Very cool about going to comet. Can you encode a hex 'BOBF' in the
> program somewhere so I can ride along? ;)
Sure. We'll see if it survives code review. I did manage to encode my kids' birthdays in the HETE-2 (gamma ray mission) software a few years ago ;-)
> You received this message because you are subscribed to the Google Groups "IBM1130" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ibm1130+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com
"Richard Stofer" <rst...@pacbell.net> Jan 22 01:39PM -0800
Quoting from "Elements of IBM1130 Programming":
" A special feature of the Monitor System is that of file protection. All
disk I/O subroutines check to make certain that writing on the disk is to
take place in the Working Storage area. Thus, the programmer cannot
inadvertently wipe out a portion of the Systems Area or User Area. However,
there are two exceptions to this. First, a special function called Write
Immediate will cause information to be written wherever the access mechanism
is positioned without making any check. Second, data files that are built
up in Working Storage can be moved into User Area with the appropriate
statements.
"The reader should recognize that these safeguards int eh Assembly language
are software-provided and are not part of the 1130 System Handware"
DISKZ is intended for use with Fortran programs because it doesn't make
checks for correct calls. Instead it relies on the compiler to make the
proper calls. DISKZ was not intended to hold the programmer's hand.
What would be more interesting is creating more than 1 file in working
storage. At this point, I suspect that the assembler FILE statement and/or
the *FILES card will become important because there has to be some kind of
offset over the first file to the beginning of the second file.
For those who really want to get their hands dirty working with assembly
language and hardware devices, Chapter 17 of "Elements..." has an airline
reservation system written in assembly language. It begins with creating a
file from cards that contains flight numbers, seats available in first class
or coach and fare for first class or coach. It progresses to using the
console to make reservations on the flight by updating the data file. It's
certainly not a complete solution to airline reservation but it's an
interesting bit of code. Maybe tomorrow...
I have so much to learn about the 1130. I thought I had it down pretty well
but that's just because my Fortran code worked. I certainly never had to
drive devices.
Richard
-----Original Message-----
From: ibm...@googlegroups.com [mailto:ibm...@googlegroups.com] On Behalf
Of Bob Flanders
Sent: Wednesday, January 22, 2014 9:02 AM
To: ibm...@googlegroups.com
Subject: Re: [IBM1130] Re: Small assembler program
I think that IBM figured if you want to write to existing file, do so at
your own risk and use DISKZ. Then file, DSA, etc become valuable, but know
what you are doing. If you only need scratch space, use DISKN or DISK1.
On Wed, Jan 22, 2014 at 11:59 AM, Bob Flanders <bob.fl...@gmail.com>
wrote:
John Doty <j...@noqsi.com> Jan 22 09:35PM -0700
On Jan 22, 2014, at 2:39 PM, Richard Stofer wrote:
> DISKZ is intended for use with Fortran programs because it doesn't make
> checks for correct calls. Instead it relies on the compiler to make the
> proper calls.
Also system programs, not just Fortran. DISKZ was the disk driver that was in core by default.
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com
Peter Sawyer <peter....@sympatico.ca> Jan 23 12:21AM -0500
--
The DISKZ interface, a BSI to DZ000 (decimal 242, /F2) was supported by
DISK1 and DISKN, so code written to use that calling method would work no
matter which DISKx version was in core. Writes using that interface could be
done anywhere. DISKN was able to support multiple operations on multiple
devices, but was also fast enough to read consecutive sectors without
missing a revolution of the disk. When Fortran programs had large SOCAL
overlays, it was sometimes worth it to run them with DISKN. Despite the
smaller available memory, the execution time could be better.
BTW, when the DISKx sub was being switched (that was done by the CIL, phase
2 @CIL2 (/A1)), there was a visible WAIT during the disk read. Neat to see
on the console lights.
----- Original Message -----
From: "John Doty" <j...@noqsi.com>
To: <ibm...@googlegroups.com>
Sent: Wednesday, January 22, 2014 11:35 PM
Subject: Re: [IBM1130] Re: Small assembler program
You received this message because you are subscribed to the Google Groups "IBM1130" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibm1130+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.