-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Ability to load ram from a .hex records Since the RAM is small,
pasting the .hex record data from the clip board makes sense.
Our use case would be do enter a few code examples from the keyboard, then for the remainder
of our sessions, we'd like to load follow on examples from a window of
a web based assembler.
Though the other ET-3400's require .s19 format, for my purposes intel hex is better as
that is what ASM80.com puts out.
From ASM80 with .a68 files such as
;--------------------------------------------------------------------------
; Make the display do loop-d-loops with keys 1-f speed controls
; and key 0 is an exit to the monitor.
SEG_DP .EQU $80
SEG_A .EQU $40
SEG_B .EQU $20
SEG_C .EQU $10
SEG_D .EQU $08
SEG_E .EQU $04
SEG_F .EQU $02
SEG_G .EQU $01
SEGS_ALL .EQU $FF
BIOS_DISPLAY_ADDR .equ $00F0
BIOS_OUTCHR .equ $FE3A
BIOS_GETKEY .equ $FDBB
BIOS_RESET .equ $FC00
DIGIT_ADDR_MSB .EQU $C100
DIGIT_LSB_0 .EQU $6F
DIGIT_OFFSET .EQU $0010
DIGIT_LSB_1 .EQU DIGIT_LSB_0-DIGIT_OFFSET
DIGIT_LSB_2 .EQU DIGIT_LSB_1-DIGIT_OFFSET
DIGIT_LSB_3 .EQU DIGIT_LSB_2-DIGIT_OFFSET
DIGIT_LSB_4 .EQU DIGIT_LSB_3-DIGIT_OFFSET
DIGIT_LSB_5 .EQU DIGIT_LSB_4-DIGIT_OFFSET
;-----------------------------------------------------------------------------------
; PHASE 5: Cycle through all the displays w/ Speed Control
;
.org $0000
CycleDisplaysWithSpeedControl:
JSR CycleDisplays
JSR BIOS_GETKEY ; Is any key pressed?
BCC CycleDisplaysWithSpeedControl ; No Key start over
CMPA #$00 ; $00?
BEQ CheckKeyExit ; Its 0, start over
STAA DelayCount ; Use it- store it in MSB of DelayCount
JMP CycleDisplaysWithSpeedControl ; Key 0 was pressed, reset.
;-----------------------------------------------------------------------------------
; PHASE 4: Cycle through all the displays
;
.org $0020
CycleDisplaysTest:
JSR CycleDisplays
BRA CycleDisplaysTest
CycleDisplays:
LDX # DisplayDIgitLSBList
MoreDisplays:
LDAA 0,X
BEQ CycleDisplaysExit
STAA DisplayAddress+1 ; LSB
STX DisplayDigitListAddress ; save it
LDX DisplayAddress
JSR CycleSegments
LDX DisplayDigitListAddress ;Restore it
INX ; ppint tp mext LSB
BRA MoreDisplays
CycleDisplaysExit:
RTS
CurrentDisplayAddr:
.DW DIGIT_ADDR_MSB+DIGIT_LSB_0 ; First display
DisplayDigitLSBList:
.DB DIGIT_LSB_0,DIGIT_LSB_1,DIGIT_LSB_2,DIGIT_LSB_3,DIGIT_LSB_4,DIGIT_LSB_5,0
; Poke into the LSB and put out the full address.
DisplayAddress:
.DW DIGIT_ADDR_MSB
DisplayDigitListAddress:
.DW $0000
;-----------------------------------------------------------------------------------
; PHASE 3: Cycle segments a-b-c-d-e-f-a with delay
; Display address is in X
; Noting is preseverd.
.org $050
CycleSegmentsTest:
LDX # DIGIT_ADDR_MSB+DIGIT_LSB_0
JSR CycleSegments
BRA CycleSegmentsTest
CycleSegments:
LDAA # SEG_A
NextSeg:
PSHA
JSR DisplaySegmentPaced
PULA
ASRA
CMPA # SEG_G
BEQ CycleSegExit
BRA NextSeg
CycleSegExit:
; Redisplay seg A.
LDAA # SEG_A
JSR DisplaySegmentPaced
; Clear last one no delay
LDAA #$00
JSR DisplaySegment
RTS
; Subroutine to output a 7-seg LED value & Delay
; X passed in has display address, not preserved.
DisplaySegmentPaced:
JSR DisplaySegment
JSR Delay
RTS
; Subroutine to produce a fixed delay
; using a busy loop decrementing X from a fixed value.
; X is preserverd.
Delay:
STX DelayXSave
LDX DelayCount
DelayMore:
BEQ DelayExit
DEX
BRA DelayMore
DelayExit:
LDX DelayXSave
RTS
DelayCount:
.DW $0F00
DelayXSave:
.DW $0000
;-----------------------------------------------------------------------------------
; PHASE 2: Test program to see if we can write a segment
; As a built in .DW if the first display, but if overwritten,
; it will write to any of them.
; Waits for a key press to exit.
.org $0090
DisplaySegmentTest:
LDAA # SEGS_ALL
LDX # DIGIT_ADDR_MSB+DIGIT_LSB_0
JSR DisplaySegment
BRA DisplaySegmentTest
DisplaySegment:
STX BIOS_DISPLAY_ADDR
JSR BIOS_OUTCHR
JSR CheckKey
RTS
;-----------------------------------------------------------------------------------
; PHASE 1: Key Routines & Exit to BIOS
.org $00B0
CheckKeyTest:
JSR CheckKey
BRA CheckKeyTest
CheckKey:
JSR BIOS_GETKEY ; Is any key pressed?
BCC CheckKeyExit ; No Key was pressed
CMPA #$00 ; $00?
BNE CheckKeyExit ; No- so don't reset
JMP BIOS_RESET ; Key 0 was pressed, reset.
CheckKeyExit:
RTS
--- This is available in a wind to cut and past from in a window, intel hex:
:10000000BD0025BDFDBB24F8810027F4978420F0B6
:10002000BD002520FBCE003DA600270E9745DF46EC
:10003000DE44BD0058DE460820EE39C16F6F5F4FC9
:080040003F2F1F00C10000006A
:10005000CEC16FBD005820F8864036BD00713247D2
:100060008101270220F48640BD00718600BD009A00
:1000700039BD009ABD007839DF86DE842703092068
:08008000FBDE86390F000000D1
:1000900086FFCEC16FBD009A20F6DFF0BDFE3ABDEF
:0300A00000B5396F
:1000B000BD00B520FBBDFDBB2407810026037EFCEF
:0200C000003905
:00000001FF
Maybe this shows you my code in the assembler?
https://www.asm80.com/?nfname=Test&nftype=a68#Phase4-a68