Writing Windows programs in 370 Assembler 
Author Message
 Writing Windows programs in 370 Assembler

Greeting everyone.

Sometime ago, I advised everyone about a convertor I wrote that allows
370 ALC/BAL programs to run on PC's, under OS/2 or Windows.

Another project I have been working on for years is what I call EASYFORM
or EASYPANEL.  In Alpha test now, it allows programmers to write Windows
programs, 3270 or character mode "panels" or forms in an easy to use use
set or macros.

For example, to make a simple program is similar to this:

      MENUBAR 'Help Files      Help'
     INPUT   'Please enter your name', name, 30
     ....
     READPANEL                  Note - no events, no "Windows" style
loops.  Simple.

Now the exciting part.

Just last night, I combined the 370 to 486 program with the EASYPANEL
program, and wrote a program in BAL that actually made and ran a real
Windows program.

Would anyone like me to post the 370 program to see what it looks like?

Cheers,

Clem Clarke

--

  ,-._|\  Clement V. Clarke - Author Jol, EASYJCL, EASYPANEL, OSCAR,
370TO486

http://www.*-*-*.com/ ~oscarptyltd
 \_,--.x/ P.O. Box 475, Toorak, Victoria, AUSTRALIA, 3142.
       v  Tel (61)-3-9818-8351, Fax (61)-3-9819-2848.



Mon, 10 Feb 2003 12:56:51 GMT  
 Writing Windows programs in 370 Assembler
<snip>
Quote:
> Just last night, I combined the 370 to 486 program with the EASYPANEL
> program, and wrote a program in BAL that actually made and ran a real
> Windows program.

> Would anyone like me to post the 370 program to see what it looks like?

<snip>

Yes, please do so.

--
Steve Thompson
OSP LLC
330/335-9907 office
330/334-2097 fax

Remove "_" in email address to contact me -- anti-spam measures
in use



Mon, 10 Feb 2003 03:00:00 GMT  
 Writing Windows programs in 370 Assembler
I've had a number of requests to actually post the code.

Before I get jumped on from great heights or flamed mercilessly, please note
that I work by myself - this is not a company trying to push a product - well
maybe soon?   This is all alpha type stuff (work in progress) that seems to
be of interest to a number of people.

That said, funding gratefully accepted <smile>

Cheers,

Clem Clarke

=============================================
*--------------------------------------------------------------------
*
* Sample 370 Under Win32 program.
*
* Clem Clarke, August 25, 2000.
*
*
* This program is (I think) a world first.
*
* It is a 370 BAL program that actually creates a Microsoft Win32
* input program.
*
* It looks like a Windows 32 bit program, because that's exactly
* it is - a Microsoft Windows program, but written in the best
* Assembler language there is - IBM's ALC/BAL code.
*
* Note 1:  If compiled on a mainframe, it will use Character Mode 3270
*          and if compiled for DOS, a character mode screen will
*          be used.
*
* Note 2:  There are no new major programming techniques to be learned.
*
*          When a screen is drawn with the MenuBar, Input etc
*          statement, a READPANEL macro instruction is executed.
*          Until a Function Key is pressed, or the Return/Enter
*          key is pressed, the program DOES NOT receive control,
*          just like a 3270.
*
*          Therefore, programming techniques currently in use
*          by Mainframe Programmers can be used.
*
*          This uses the EASY PANEL routines.
*
*          EASY PANEL provides a NON-Oop, NON-Event subroutines for Forms
*          or Data Entry.
*
*    The routines cut the amount of coding necessary to
*          write Windows, X11, OS/2 and Character Terminals (Unix, 3270)
*          Forms and Menus and Popups by 400%.
*
*--------------------------------------------------------------------
*
*
*
SYSTEM  DATASECT
SYSMENU DC     CL30
SYSPOP  DC     CL30
SYSPFK  DS     H
TESTDATA DATASECT
*
RecLen  DC     H'0'              Variable Blocked Record Type
        DC     H'0'              Half word 0 for VB type
Name_   DC     CL30              Result for Input 'NAME' Panel command
Surname DC     CL30              Result for Input 'SURNAME' Panel
Address DC     CL30              Result for Input 'ADDRESS' Panel
City    DC     CL30              Result for CITY
MALE    DC     CL3' '            Male Button
FEMALE  DC     CL3' '            Female Button
RecEnd  Equ    *
*
COUNT   DC     H'0'              This program loops around 5 times
*
FILEOUT DCB LRECL=80,BLKSIZE=4096,MACRF=PM,RECFM=V,              XXXXXXX
               DSNAME='testout.new'
        GENSAVE CSECT=MAIN
        open FILEOUT,(OUTPUT)
        LA     R1,=AL2(RecEnd-RecLen)
        STH    R1,RecLen
LOOPX   EQU    *
        Menu_Bar 'Files Edit Help'         Draw Windows or 3270 Menubar
*
        Input '   Name',Name_,30,'Clem'      Set up Input for NAME
        Input 'Surname',Surname,20,'Clarke'  and Surname
        Text ''
        Input 'Address',Address,20,'P.O. Box 628'
        Input '   City',City,20,'Toorak'
        Text ''
        Button 'Male',male,15,8,10           Set Up a Button for MALE
        Button 'Female',female,15,9,10       or FEMALE
*       Status 'Press F1 for Help'
*
LOOPY   EQU    *
        Read_Panel                   Get User Input from 3270 or Windows
*                                    and WAIT for ENTER.
*
        B   NOTHELP
        CLC =C'HELP',SysMenu         User select HELP ?
        BE  DOHELP
        CLC =H'1',SysPFK             or press F1
        BE  DOHELP                   Yes
*
NOTHELP EQU   *                      Not Help - Output record to file
*                                    and check for end.
        put  FILEOUT,reclen
*
        LH  R1,count
        LA  R1,1(R1)
        STH R1,count
        CH  R1,=H'5'
        BL  loopy
        return (14,12)               Return to Operating System.
*
*
DOHELP  EQU *                        Pop up some HELP for User
*
            PopUp '&Contents'
            PopUp '&Using Help'
            PopUp '&About'
            PopUp ''
            Panel_Msg SysPop
        B   loopy
*
        JOLretn
        LTORG
        END

--

  ,-._|\  Clement V. Clarke - Author Jol, EASYJCL, EASYPANEL, OSCAR, 370TO486


http://www.ozemail.com.au/~oscarptyltd
 \_,--.x/ P.O. Box 475, Toorak, Victoria, AUSTRALIA, 3142.
       v  Tel (61)-3-9818-8351, Fax (61)-3-9819-2848.



Tue, 11 Feb 2003 11:55:48 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Assembler 370 compiler.....Windows/DOS

2. FA: Assembler Language Programming for the IBM 370

3. An easy assembler program for Assemble 370.

4. Programming in OS Assembler Language for the IBM 370

5. 8086/370 assembler program

6. Assembler code within a COBOL/370 program?

7. Writing an assembler capable of making Windows programs?

8. self-booting pmode program written in assembler written in sh

9. Q: Free 370 Assembler?

10. Shareware 370 environment and assembler under Linux?

11. Source for 370 assembler?

12. 370 Assembler to run on pc

 

 
Powered by phpBB® Forum Software