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

Subversion Repositories light8080

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 22 to Rev 23
    Reverse comparison

Rev 22 → Rev 23

/trunk/asm/tb0.asm
1,25 → 1,4
;***********************************************************************
; tb0.asm : test bench for light8080 core -- Modified Kelly Smith test
;***********************************************************************
; This is a version of the Kelly Smith test for 8080 CPUs, adapted for
; TASM assembler ('Telemark Assembler', aka 'Table Assembler').
;
; The code executes from address 0 and takes a little more than 1KB. It
; uses the area immediately following the code for variables and stack,
; so this code should be placed in an 'initialized RAM' block rather
; than a ROM.
; See 'vhdl/light8080_tb0.vhdl' for an example.
;
; The resulting HEX file can be transformed into a ROM data block in
; VHDL syntax with the supplied 'util/hexconv.pl' script; assuming a ROM
; size of 2KB this is the command line:
; perl hexconv.pl TB0.HEX 0 0x0800
;
; The code exercises all instructions except I/O and calls (not at all
; exhaustively) and terminates with 0x033 in the accumulator if all the
; tests succeed or 0x0aa if any of the tests fail.
;
;***********************************************************************
; MICROCOSM ASSOCIATES 8080/8085 CPU DIAGNOSTIC VERSION 1.0 (C) 1980
;***********************************************************************
;
42,14 → 21,17
; Modified 2006/11/16 by Scott Moore to work on CPU8080 FPGA core
;
;***********************************************************************
; Modified 2008/11/23 by Jose Ruiz for use in free8080 FPGA core
; Modified 2007/09/24 by Jose Ruiz for use in free8080 FPGA core
;
; 1.- Changed formatting for compatibility to TASM assembler
; 1.- Changed formatting for compatibility to CP/M's ASM
; 2.- Commented out all Altair / MITS hardware related stuff
; 3.- Set origin at 0H
;
;***********************************************************************
 
; DS pseudo-directive; reserve space in bytes, without initializing it
; (TASM does not have a DS directive)
#define ds(n) \.org $+n
 
;
; Select controller defines
497,8 → 479,8
mvi c,045H
mvi d,046H
mvi e,047H
mvi h,temp0 / 0ffH ;high byte of test memory location
mvi l,temp0 & 0ffH ;low byte of test memory location
mvi h,temp0 / 0ffH ;high byte of test memory location
mvi l,temp0 & 0ffH ;low byte of test memory location
mov m,b
mvi b,0H
mov b,m
817,9 → 799,11
pchl ;test "pchl"
 
cpuer: mvi a, 0aaH ; set exit code (failure)
out 20h
hlt ; stop here
 
cpuok: mvi a, 033H ; set exit code (success)
cpuok: mvi a, 55H ;
out 20h
hlt ; stop here - no trap
 
 
826,26 → 810,20
;
; Data area in program space
;
tempp: .dw temp0 ; pointer used to test "lhld","shld",
; and "ldax" instructions
tempp: .dw temp0 ;pointer used to test "lhld","shld",
; and "ldax" instructions
;
; Data area in variable space
;
temp0:
.org $+1 ;temporary storage for cpu test memory locations
temp1:
.org $+1 ;temporary storage for cpu test memory locations
temp2:
.org $+1 ;temporary storage for cpu test memory locations
temp3:
.org $+1 ;temporary storage for cpu test memory locations
temp4:
.org $+1 ;temporary storage for cpu test memory locations
savstk:
.org $+2 ;temporary stack-pointer storage location
temp0: ds(1) ;temporary storage for cpu test memory locations
temp1: ds(1) ;temporary storage for cpu test memory locations
temp2: ds(1) ;temporary storage for cpu test memory locations
temp3: ds(1) ;temporary storage for cpu test memory locations
temp4: ds(1) ;temporary storage for cpu test memory locations
savstk: ds(2) ;temporary stack-pointer storage location
 
.org $+256 ;de-bug stack pointer storage area
stack: .dw 0
ds(256) ;de-bug stack pointer storage area
stack: .dw 0
 
.end

powered by: WebSVN 2.1.0

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