I was told to do some project for my microprocessor class mini project
which is about carpark system simulation using wookie and winbug
basically what the lecturer wants is a system like those that you see in carpark.
Lets say there are 9 lots available in the carpark, the first car enters and as the sensor reads it deduces one lot so it is left with 8 and then the next car is to cum along and as it hits the sensor it goes to 7 lots and so on until the there is no more lot, the program should show FULL on the LED.
I got the program, but i could not display my numbers correctly on the LED as i touch the sensor with the card(which represents the car) then it changes to FULL on the LED.
this is the program hope some one can help, this is not a C++ program but hope someone can help me.
PORTA EQU $1000
PORTB EQU $1004
PORTE EQU $0A
REBASE EQU $1000
ORG $0100
LDY #REBASE
LDAA #$09
LDX #DATA
STAA $0010
AGAIN LDAA $0010
BEQ FULL
BNE NOTFULL
BRA AGAIN
FULL LDAA #$71
LDAB #$00
STAB PORTA
STAA PORTB
JSR DELAY3
LDAA #$71
LDAB #$10
STAB PORTA
STAA PORTB
JSR DELAY3
LDAA #$41
LDAB #$20
STAB PORTA
STAA PORTB
JSR DELAY3
LDAA #$38
LDAB #$30
STAB PORTA
STAA PORTB
JSR DELAY3
BRSET PORTE,Y $02 COUNTUP
BRSET PORTE,Y $00 FULL
NOTFULL BRSET PORTE,Y $01 COUNTDOWN
BRSET PORTE,Y $02 COUNTUP
BRA NOTFULL
COUNTDOWN DECA
STAA $0010
LDAB 0,X
STAB PORTB
PSHY
LDY #$FFFF
DELAY1 DEY
BNE DELAY1
PULY
INX
BRA AGAIN
COUNTUP INCA
STAA $0010
LDAB 0,X
STAB PORTB
PSHY
LDY #$FFFF
DELAY2 DEY
BNE DELAY2
PULY
DEX
BRA AGAIN
DELAY3 PSHA
LDAA #$FF
LOOP DECA
BNE LOOP
PULA
RTS
DATA FCB $F3,$7F,$0F,$60,$24,$4C,$06,$12,$4F,$01,$00
END