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

Subversion Repositories 8051

[/] [8051/] [trunk/] [asm/] [lcall.asm] - Rev 131

Go to most recent revision | Compare with Previous | Blame | View Log

;
; test lcall and bit addressable memory space
;
        mov 20h, #00h   ;
        setb  02h       ;
        lcall t         ;
        mov P0, 20h     ;
        ljmp e          ;

t:
        mov P0, #10     ;
        ret     ;
e:
        nop     ;
        nop     ;

;
; test p bit in psw
;
        mov r0, #0f0h   ;
        mov a, #031h    ;    p=1
        mov c, psw.0    ;
        jnc error       ;
        mov p0, #001h   ;
        mov r0, #0f1h   ;
        mov a, #063h    ;    p=0
        mov c, psw.0    ;
        jc error        ;
        mov P0, #02h    ;
        jnz test1       ;
        nop
        nop
        nop
test1:
        ljmp test       ;

error:
        mov p1, r0;

;
; test relative jumps
;


        org 01f0h       ;
done:
        nop             ;
        mov p0, #33h    ;
        ajmp done       ;

        org 0210h
test:
        mov b, #04h     ;
        clr a           ;
        jz done         ;

        org 02f0h       ;
        mov r0, #00     ;
        ljmp error      ;

end


Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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