MCS BASIC-52 with ROMJ Expansion
 

COMMANDS
RUN CONT LIST LIST# LIST@
NEW NULL RAM ROM XFER
PROG PROGx 

x=1,2,3,4,5,6

FPROG FPROGx 

x=1,2,3,4,5,6

Expansion ROM
DIS.x x=type HEX.x x=L,S PRG.x x=I,E MOV. HELP
Display internal/ external memory Intel HEXFile Send/Load Normal & fast E/EPROM Prog. Move blocks of memory Help on ROMJ Commands
VER.x FIL.
Compare Memory Fill Memory
STATEMENTS
BAUD CALL CLEAR CLEAR S CLEARI
CLOCK0 CLOCK1 DATA READ RESTORE
DIM DO-WHILE DO-UNTIL END FOR-TO-STEP
NEXT GOSUB RETURN GOTO ON-GOTO
ON-GOSUB IF-THEN-ELSE INPUT LET ONERR
ONEX1 ONTIME PRINT or (?) PRINT# PRINT@
PH0. PH0.# PH0.@ PH1. PH1.#
PH1.@ PGM PUSH POP PWM
REM RETI STOP STRING UI0,1
UO0,1 LD@ ST@ IDLE RROM
OPERATORS
+,-,*,/ ** (EXP) .AND. .OR. .XOR.
.OR. (NOT) ABS INT SGN SQR
RND LOG EXP SIN COS
TAN ATN =,>,>=,<,<=,<> ASC CHR
CBY(*) DBY(*) XBY(*) GET IE
IP PORT1 PCON RCAP2 T2CON
TCON TMOD TIME TIMER0 TIMER1
TIMER2 XTAL MTOP LEN FREE
PI
* Peek and Poke: CBY = Code, DBY = internal Data, XBY = external RAM
 

User Guide-ROMJ


1.0 INTRODUCTION

The ROMJ expansion package adds several commands to Intel's MCS® BASIC-52. ROMJ will work with the original (V1.1) 8052AH-BASIC from Intel, and also with the 80C52-BASIC from Micromint and others, including mine!(See the xxx). All of the commands were added using the procedures defined in the User's Manual, different versions are not required for the two implementations.

2.0 ROMJ COMMANDS

2.1 COMMAND: HELP

FORMAT: HELP[Command]

Description:
The help command displays a short "memory jogger" description of a ROMJ command, and its parameters. The HELP command typed by itself, or with HELP as the command, will display the format of the HELP command and a list of the ROMJ commands. Unsupported commands will produce the same display as the HELP comand by itself.

Example:
READY
>HELP
HELP [command]
command = DIS. HEX. MOV.
                  PRG. FIL. VER.
READY
>HELP DIS.
DIS.[[M][P],C[P],D[P]] START,END [x]=OPT
M=RAM(OPTIONAL), C=CODE, D=DATA, P=PRINT
DIS.[M]P DISPLAY RAM MEMORY AND PRINT
DIS.CP DISPLAY CODE MEMORY AND PRINT
READY
>

Note that the HELP command is the only command that doesn't include a period.

2.2 COMMAND: DIS. (Display memory)

FORMAT 1: DIS.[[M]P] Start-address, Ending-address

FORMAT 2: DIS.C[P] Start-address, Ending-address

FORMAT 3: DIS.D[P] Start-address,Ending-address

Description:
This command will display the specified type, and selected area of memory on the console device. The display will be one or more lines of hex formatted data. Each line will start with the address of the first byte displayed, followed by 8 or 16 bytes of data.

Parameters:
M = Memory display-default parameter, external RAM will be displayed.
C = Code display. Internal or external code memory will be displayed.
D = Data display. Internal MPU data memory will be displayed. Note: 0-127 (0-7FH) =direct memory, 128-255 (80H-FFH) = indirect memory.
P = Print characters also. Printable characters will be displayed on the same line, with
unprintable characters displayed as periods. This option will shorten the normal 16 characters line to 8, to allow for the character display.
Start &
Ending = numbers or expressions which resolve to valid addresses. (Start < End < 10000H)
address

Examples: (Display bytes 1-5 using each type of memory with character display)

READY
>DIS. 1,5
0000H 03H 00H 00H 00H 08H 01H 0FH 10H 31H 2CH 35H 0DH 01H 2CH 35H 0DH
READY
>DIS.MP 1,5
0000H 03H 00H 00H 00H 0AH 01H 11H 10H . . . . . . . .
READY
>DIS.CP 1,4+1
0000H 61H 87H 37H 20H 31H 2DH C0H D0H a . 7 1 - . .
READY
>DIS.DP 1,5
0000H F8H 01H 01H 00H 00H 48H 55H 17H . . . . . U .
READY
>

(Note: The addresses are modified by the command to start on an 8 or 16 byte boundry, and the ending address is rounded up to the next 8 or 16 byte boundry.)

Error Messages:

The standard BASIC generated messages may be produced by this command.
A command "Abort!" message will be produced if the ending address is less than the starting address.

Example:

READY
>DIS. 2000,2000-50
START > END...ABORT!
READY
>

OPTIONS:

Several versions of ROMJ are available. The only difference between them is the DIS. formats. The ROMJD.HEX adds a decimal address column to the display, and the ROMJS.HEX shortens the display to 40 columns maximum (Short display).

ROMJD.HEX:
READY
>DIS.MP 1,0EH
0 0000H 03H 00H 00H 00H 0CH 7FH 13H 10H . . . . . . . .
8 0008H 4DH 50H 31H 2CH 30H 45H 48H 0DH M P 1 , 0 E H .
READY
>

ROMJS.HEX:
READY
>DIS.MP 1,0EH
0000 01 00 00 00 0C 01 13 10 ........
0008 4D 50 31 2C 30 45 48 0D MP1,0EH.
READY
>

2.3 COMMAND: MOV. (Move or copy a block of memory.)

FORMAT: MOV.[C] Source-start,Source-end, Target-start

Description:
Move a block of memory from <Source-start> through <Source-end> inclusive, to <Target-start>. MOV. is a smart move. It will detect if the target block and source block overlap, and will insure that the target block is an exact copy of the source.

Parameters:

C = Code memory will be referenced for the source block.
Start & End = numbers or expressions which when resolved are valid addresses. (Source-start <
Source-end < 10000H, and Target-start < 10000H)

Example:

READY
>DIS.1FE0H,1FFFH
1FE0H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H
1FF0H 22H 22H 22H 22H 22H 22H 22H 22H 22H 22H 22H 22H 22H 22H 22H 22H
READY
>FIL.1FF4H,1FF6H,33H
READY
>DIS.1FE0H,1FFFH
1FE0H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H
1FF0H 22H 22H 22H 22H 33H 33H 33H 22H 22H 22H 22H 22H 22H 22H 22H 22H
READY
>MOV.1FEDH,1FF4H,1FF7H
READY
>DIS.1FE0H,1FFFH
1FE0H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H 11H
1FF0H 22H 22H 22H 22H 33H 33H 33H 11H 11H 11H 22H 22H 22H 22H 33H 22H
READY
>

Error Messages:

The standard BASIC generated messages may be produced by this command.
A command "Abort!" message will be produced if the ending address is less than the starting address.

Example:

READY
>MOV. 2000,2000-50,3000H
START > END...ABORT!
READY
>

2.4 COMMAND: FIL.

FORMAT: FIL. Start,End,<exp>

Description:
Fill a block of memory.

Parameters:

Start,End = numbers or expressions which resolve to valid addresses. (Start < End)
<exp> = An expression which resolves to a 16-bit integer (< 65536) or less, of which
              the lower byte will be written to Start through End inclusive

Example:

READY
>DIS.2000H,200FH
2000H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H
READY
>FIL.2004H,200AH,33H
READY
>DIS.2000H,200FH
2000H 00H 00H 00H 00H 33H 33H 33H 33H 33H 33H 33H 00H 00H 00H 00H 00H
READY
>

2.5 COMMAND: VER. (Verify two blocks of memory are identical.)

FORMAT: VER.[C] Block1-start,Block1-end,Block2-start

Description:

The verify command will do a byte-by-byte compare of two blocks of memory. If a miscompare occurs, the addresses of the error, and 8 bytes of each block will be displayed on the console device, and the verify will continue from that point.

Parameters:

C = Code memory will be referenced for Block1.
Block1-start
Block1-end = Numbers or expressions which when resolved are valid addresses.
Block2-start (Block1-start < Block1-end, and Block2 < 10000h)

Example:

READY
>FIL.2000H,4000H,22H
READY
>FIL.3000H,3001H,33H
READY
>VER.2000H,2FFFH,3000H
2000 22 22 22 22 22 22 22 22
3000 33 33 22 22 22 22 22 22
READY
>

2.6 COMMAND: HEX. (Intel HEXfile send and load.)

FORMAT1: HEX.L[P] offset (Load an Intel HEX file.)

FORMAT2: HEX.S[C] Start,End (Send an Intel HEX file.)

Description:

The HEX. command will load a standard Intel HEX format file from the console port, or send a block of memory to the console port in Intel HEX format.

Parameters:

L = Load an Intel hex formated file.
P = Prompt, with the standard MCS BASIC-52 prompt character (<), for each line to be sent.
S = Send a block of memory to the console device.
C = Code memory will be referenced for the source.
offset = The standard hex format contains the address of the first byte in the record for that line. The offset value will be added to
             the address in the record, permitting you to relocate the data to a different address.
Start,End = Numbers or expressions, which when resolved, are valid addresses. A hex file will be sent from Start to End inclusive.

Examples:

READY
>HEX.SC 0,1FH (Send a HEX file starting at Code address 0 through 1FH)
:100000006187FF20312DC0D0024003C0D0202E10C8
:1000100002400B20122BC0D0024013C0D0021F7828
:00000001FF
READY
>
READY
>HEX.LP 0 (Load a HEX file at the address in the HEX image +0)
READY TO PROGRAM...SEND HEX FILE
> (The first HEX file image was sent in response to the prompt)
(The remaining hex file was sent here)
READY (The load is now done!)
>

2.7 COMMAND: PRG. (Program an EPROM from memory)

FORMAT1: PRG. Start,End,Estart (Normal 50ms pulse width)
FORMAT2: PRG.I Start,End,Estart (Intelligent algorithm 1ms pulse)
FORMAT3 PRG.E Start,End,Estart (EEPROM/RAM 0.5ms pulse width)

Description:
Program an EPROM/RAM/EEPROM using 50/1/0.5ms pulse widths from Start to End inclusive, at Estart address in EPROM/EEPROM/RAM.

Parameters:

I = "Intel"ligent algorithm by Intel. 1ms pulse widths.
E = EEPROM/RAM 0.5ms pulse widths (Note-If it's RAM and DATA, just MOVe it...)
none = Normal EPROM programming algorithm-50ms pulse widths
Start,End = Numbers or expressions, which when resolved, are valid addresses. An EPROM will be programmed
                  from Start to End inclusive.
Estart = Starting address in EPROM to program

Examples:

READY
>PRG. 2000H,2100H,8000H
INSERT EPROM,
AND APPLY PROGRAMMING VOLTAGE    (Plug in the power)
PRESS ANY KEY WHEN READY...
IF PROGRAMMING ERRORS,THEN REMOVE VOLTAGE
(Programming takes place here)
REMOVE PROGRAMMING VOLTAGE!  (Turn off the Vpp)
READY
>
 

The End!