OpenCores
URL https://opencores.org/ocsvn/t51/t51/trunk

Subversion Repositories t51

[/] [t51/] [trunk/] [sw/] [BASIC-52.asm] - Diff between revs 6 and 7

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 6 Rev 7
Line 6... Line 6...
;*             Intel Corporation, Embedded Controller Operations             *
;*             Intel Corporation, Embedded Controller Operations             *
;*                              is public donain                             *
;*                              is public donain                             *
;*                                                                           *
;*                                                                           *
;*---------------------------------------------------------------------------*
;*---------------------------------------------------------------------------*
;*              Alterations made by D. Wulf , December 18, 1999              *
;*              Alterations made by D. Wulf , December 18, 1999              *
 
;*              Alterations made by D. Wallner , May 4, 2002                 *
;*                                                                           *
;*                                                                           *
;*****************************************************************************
;*****************************************************************************
;
;
;  The BASIC-52.SRC source listing, when compiled without modification,
;  The BASIC.a51 source listing, when compiled without modification,
;  create the same object code that is found on the MCS BASIC-52
;  create the same object code that is found on the MCS BASIC-52
;  Version 1.1 microcontrollers.
;  Version 1.1 microcontrollers but with a timing independent baud rate
 
;  recognition routine and a shorter ego message.
;
;
;  The following alterations are made to the original source code:
;  The following alterations are made to the original source code:
;
;
;  The original source code had 2 files BASIC.SRC and FP52.SRC those have
;  The original source code had 2 files BASIC.SRC and FP52.SRC those have
;  been incorporated into this file for ease of assembly.
;  been incorporated into this file for ease of assembly.
Line 27... Line 29...
;  by the menomics.
;  by the menomics.
;
;
;  One routine in the source was different to the ROM code and is replaced
;  One routine in the source was different to the ROM code and is replaced
;  by the ROM code.
;  by the ROM code.
;
;
 
;  Daniel Wallner , May 4, 2002:
 
;  Part of ego message replaced with a different baud recognition routine.
 
;
;*****************************************************************************
;*****************************************************************************
;
;
T2CON   EQU     0C8H ; This three lines are necessary for MS-DOS freeware
T2CON   EQU     0C8H ; This three lines are necessary for MS-DOS freeware
TL2     EQU     0CCH ; MCS-51 Family Cross Assembler  ASEM-51 V1.2
TL2     EQU     0CCH ; MCS-51 Family Cross Assembler  ASEM-51 V1.2
TH2     EQU     0CDH ; from W.W. Heinz (e-mail: ww@andiunx.m.isar.de)
TH2     EQU     0CDH ; from W.W. Heinz (e-mail: ww@andiunx.m.isar.de)
Line 1079... Line 1084...
        JNB     ACC.0,BG3       ;NO RUN IF WRONG TYPE
        JNB     ACC.0,BG3       ;NO RUN IF WRONG TYPE
        MOV     DPTR,#ROMADR+16
        MOV     DPTR,#ROMADR+16
        MOVX    A,@DPTR         ;READ THE BYTE
        MOVX    A,@DPTR         ;READ THE BYTE
        CJNE    A,#55H,BG3
        CJNE    A,#55H,BG3
        LJMP    CRUN
        LJMP    CRUN
        ;
 
 
        ; START OF BAUD RATE MODIFICATIONS BY DANIEL WALLNER
 
 
BG1:    CLR     A               ;DO BAUD RATE
BG1:    CLR     A               ;DO BAUD RATE
        MOV     R3,A
        MOV     R3,A
        MOV     R1,A
        MOV     R1,A
        MOV     R0,#4
        MOV     TL2,A
 
        CLR     T2CON.2
        JB      RXD,$           ;LOOP UNTIL A CHARACTER IS RECEIVED
        JB      RXD,$           ;LOOP UNTIL A CHARACTER IS RECEIVED
        ;
        MOV     T2CON,#5
BG2:    DJNZ    R0,$            ;FOUR CLOCKS, IN LOOP
        CALL    TIB2
        CALL    DEC3211         ;NINE CLOCKS
 
        MOV     R0,#2           ;ONE CLOCK
 
        JNB     RXD,BG2         ;TWO CLOCKS, LOOP UNTIL DONE
 
        JB      RXD,$           ;WAIT FOR STOP CHARACTER TO END
 
        JNB     RXD,$
        JNB     RXD,$
 
        MOV     T2CON,#34H
        CALL    RCL             ;LOAD THE TIMER
        CALL    RCL             ;LOAD THE TIMER
        ;
        NOP
 
        NOP
 
 
 
        ; END OF BAUD RATE MODIFICATIONS BY DANIEL WALLNER
 
 
 
 
BG3:    MOV     DPTR,#S_N       ;GET THE MESSAGE
BG3:    MOV     DPTR,#S_N       ;GET THE MESSAGE
        ACALL   CRP             ;PRINT IT
        ACALL   CRP             ;PRINT IT
        LJMP    CRAM
        LJMP    CRAM
 
 
; END
; END
Line 5758... Line 5768...
        POP     DPH
        POP     DPH
        CLR     A               ;NO ERRORS
        CLR     A               ;NO ERRORS
        RET                     ;EXIT
        RET                     ;EXIT
        ;
        ;
$EJECT
$EJECT
 
 
 
        ; START OF BAUD RATE MODIFICATIONS BY DANIEL WALLNER
 
TIB1:MOV        ACC,TL2
 
        JB      ACC.3,TIB1
 
        CALL    DEC3211
 
TIB2:   MOV     ACC,TL2
 
        JNB     ACC.3,TIB2
 
        JNB     RXD,TIB1                ;16x12 CLOCKS, LOOP UNTIL DONE
 
        JB      RXD,$           ;WAIT FOR STOP CHARACTER TO END
 
        RET
 
 
        ;**************************************************************
        ;**************************************************************
        ;
        ;
        ; WB - THE EGO MESSAGE
        ; WB - THE EGO MESSAGE
        ;
        ;
        ;**************************************************************
        ;**************************************************************
        ;
        ;
WB:     DB      'W'+80H,'R'+80H
WB:
        DB      'I'+80H,'T'+80H,'T','E'+80H,'N'+80H
;       DB      'W'+80H,'R'+80H
        DB      ' ','B'+80H,'Y'+80H,' '
;       DB      'I'+80H,'T'+80H,'T','E'+80H,'N'+80H
        DB      'J'+80H,'O'+80H,'H'+80H,'N'+80H,' '+80H
;       DB      ' ','B'+80H,'Y'+80H,' '
        DB      'K','A'+80H,'T'+80H,'A'+80H,'U'+80H
;       DB      'J'+80H,'O'+80H,'H'+80H,'N'+80H,' '+80H
        DB      'S','K'+80H,'Y'+80H
;       DB      'K','A'+80H,'T'+80H,'A'+80H,'U'+80H
 
;       DB      'S','K'+80H,'Y'+80H
 
 
 
        ; END OF BAUD RATE MODIFICATIONS BY DANIEL WALLNER
 
 
        DB      ', I','N'+80H,'T'+80H,'E'+80H,'L'+80H
        DB      ', I','N'+80H,'T'+80H,'E'+80H,'L'+80H
        DB      ' '+80H,'C'+80H,'O'+80H,'R'+80H,'P'+80H
        DB      ' '+80H,'C'+80H,'O'+80H,'R'+80H,'P'+80H
        DB      '. 1','9'+80H,'85'
        DB      '. 1','9'+80H,'85'
H_RET:  RET
H_RET:  RET
        ;
        ;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.