I've had the most fun with Hercules, poking around with "bare metal" programs.

Something I'm not likely  to be able to do  (especially  these days)
in the for seeable future.

I started with the simplest 370  I/O  (output) (see below),  then did
some "raw" dasd channel programming, then translated  those to z-arch

On 4/10/20, Charles Mills <[email protected]> wrote:
....

- Nothing is trivial in assembler. (Not too bad if WTO is a valid
approach, but if it requires opening a DCB, ...)
...

Heh, never mind "a DCB" or WTO.

Fire up Hercules,  then grab your Principles of Operation, and start
playing with "raw hardware"

You might want to start with  370  i/o, before tackling z-Architecture I/O.

Here's "Hello world"  (370)  on  "bare metal" (hercules)

u 2000.20
R00002000: 05C0         BALR  12,0                   set base reg
R00002002: 4120C01E     LA    2,30(0,12)         get CCW address
R00002006: 50200048     ST    2,72(0,0)            store it in the CAW
R0000200A: 9C000009     SIO   9(0)                   start_io  on the
"console" device
R0000200E: 8200C016     LPSW  22(12)             halt

devlist 9
0:0009 3215 *syscons cmdpref(/) noprompt pending

R:00002020:K:06=09002030 0000000B 00000000 00000000  ................
R:00002030:K:06=C8C5D3D3 D640E6D6 D9D3C400 00000000  HELLO WORLD.....
R:00002040:K:06=00000000 00000000 00000000 00000000  ................
R:00002050:K:06=00000000 00000000 00000000 00000000  ................
gpr
CPU0000: GR00=00000000  GR01=00000000  GR02=00002020  GR03=00000000
CPU000

r 0
R:00000000:K:06=00080000 00002000 00020000 80005000

restart
HHCPN038I Restart key depressed
HHCCP011I CPU0000: Disabled wait state
          HELLO WORLD


The same "hello world" is more  complicated, needing an  ORB block
with it's various fields setup to point to the CCW

Mike

On 4/10/20, Bob Bridges <[email protected]> wrote:
> It's taken me until this morning, as this thread continues, to realize that
> maybe I don't know what Hercules does after all.  "Mainframe emulation",
> I'd
> always heard, and supposed that meant that if I install Hercules on a PC
> I'll be able to write REXX execs, write and submit JCL, create PDSs and
> GDGs
> etc - in other words, that Hercules emulates MVS.  But if it doesn't
> emulate
> the mainframe operating system, what ~does~ it do?
>
> ---
> Bob Bridges, [email protected], cell 336 382-7313
>
> /* When a man is getting better he understands more and more clearly the
> evil that is still left in him.  When a man is getting worse, he
> understands
> his own badness less and less.  A moderately bad man knows he is not very
> good; a thoroughly bad man thinks he is all right.  This is common sense,
> really.  You understand sleep when you are awake, not while you are
> sleeping.  You can see mistakes in arithmetic when your mind is working
> properly; while you are making them you cannot see them.  You can
> understand
> the nature of drunkenness when you are sober, not when you are drunk.  Good
> people know about both good and evil; bad people do not know about either.
> -C S Lewis, _Christian Behavior_ */
>
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Seymour J Metz
> Sent: Friday, April 10, 2020 06:34
>
> Don't confuse IBM's position on Hercules with IBM's position on running its
> licensed software on a platform for which it is not licensed.
>
> ________________________________________
> From: IBM Mainframe Discussion List [[email protected]] on behalf of
> scott Ford [[email protected]]
> Sent: Thursday, April 9, 2020 12:55 PM
>
> Until Hercules is sanctioned by IBM I wouldnt mentioned it.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to