Jimbobjeff85
Programmer
Ok, I am writing a simple program for Motorola GP HC608.
My problem is basically I set PortB as output port and store 00 in it, which works, then when ever I try to load
values into the acumulator, and then store them in port b, it wont write them.
Here's my program up until the error:
$Include 'c:\pemicro\ics08gpz\gpregs.inc'
RAMStart EQU $0040
RomStart EQU $E000 ; This is valid ROM on the GP20 and GP32
VectorStart EQU $FFDC
org RamStart
org RomStart
;**************************************************************
;* Main - This is the point where code starts executing *
;* after a RESET. *
;**************************************************************
; MAIN PART OF PROGRAM
start
lda #$07 ;loads accumulator (temporary storage)
sta DDRB ;store contents of accumulator in DDRB
lda #$00 ;loads accumulator (temporary storage)
sta PortB ;stores contents of accumulator in Port B
startflash
redloop ldx #$12 ;stores 12 in x register,
lda #$08 ;loads accumulator with value 3
sta PortB ;stores accumulator in PortA,
jsr ondel ;jumps down program to subroutine "ondel"
lda #0 ;loads 0 into acumulator
sta PortB ;stores 0 in PortA removing red light
jsr offdel ;jumps to subroutine off delay for
dbnzx redloop ;goes back to beginning of loop
My problem is basically I set PortB as output port and store 00 in it, which works, then when ever I try to load
values into the acumulator, and then store them in port b, it wont write them.
Here's my program up until the error:
$Include 'c:\pemicro\ics08gpz\gpregs.inc'
RAMStart EQU $0040
RomStart EQU $E000 ; This is valid ROM on the GP20 and GP32
VectorStart EQU $FFDC
org RamStart
org RomStart
;**************************************************************
;* Main - This is the point where code starts executing *
;* after a RESET. *
;**************************************************************
; MAIN PART OF PROGRAM
start
lda #$07 ;loads accumulator (temporary storage)
sta DDRB ;store contents of accumulator in DDRB
lda #$00 ;loads accumulator (temporary storage)
sta PortB ;stores contents of accumulator in Port B
startflash
redloop ldx #$12 ;stores 12 in x register,
lda #$08 ;loads accumulator with value 3
sta PortB ;stores accumulator in PortA,
jsr ondel ;jumps down program to subroutine "ondel"
lda #0 ;loads 0 into acumulator
sta PortB ;stores 0 in PortA removing red light
jsr offdel ;jumps to subroutine off delay for
dbnzx redloop ;goes back to beginning of loop