home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FreeWare Collection 3
/
FreeSoftwareCollection3pd199x-jp.img
/
ms_dos
/
cmos
/
cmos.asm
next >
Wrap
Assembly Source File
|
1980-01-02
|
3KB
|
198 lines
page 90, 126
title 'FM series CMOS ram display'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; FM series CMOS ram display
; cmos ram display utility
;
;file name: CMOS.EXE
;machine: FM-TOWNS & FM-R series
;cpu: 8086, 80186, 80286, 80386
;other file: none
;asm: masm ver5.1
;tab: 8
;price: none
;copy: free
;copyright: (C) YACHT 1989.
;date: Tue, 23 Mar 1989 V1.0A
; Wed, 4 Oct 1989 V1.00B
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.8086 ; for 8086
assume cs: CODE, ss: STACK
CODE segment para public
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; main
;in: ds = PSP seg
;out: none
;dest: ?
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
main proc far
jmp main2
main2: mov ax, ds
mov es, ax
mov ax, DATA
mov ds, ax
assume ds: DATA
mov cx, 800h
mov dx, 3000h
mov bx, offset cmos
@@: in al, dx
mov [ bx ], al
inc bx
add dx, 0002
loop short @b
mov dx, offset msg
mov ah, 9
int 21h
mov si, offset cmos
xor bx, bx
mov dx, 0080h
mainlp: call prtbx
call prnts
mov cx, 0010h
push bx
@@: mov al, [ si + bx ]
inc bx
call prthx
call prnts
loop short @b
pop bx
mov al, ':'
call prnt
mov cx, 0010h
sublp: mov al, [ si + bx ]
inc bx
cmp al, ' '
jnc short @f
mov al, ' '
@@: cmp al, 7fh
jc short @f
mov al, ' '
@@: call prnt
loop short sublp
call letnl
dec dx
jnz short mainlp
mov ax, 4c00h
int 21h
main endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; prnts
;in: none
;out: none
;dest: ax, flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
prnts proc near
mov al, ' '
jmp short prnt
prnts endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; prnt
;in: al = char
;out: none
;dest: flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
prnt proc near
push ax
push dx
mov ah, 2
mov dl, al
int 21h
pop dx
pop ax
ret
prnt endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; letnl
;in: none
;out: none
;dest: flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
letnl proc near
push ax
push dx
mov ah, 9
mov dx, offset crlf
int 21h
pop dx
pop ax
ret
letnl endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; prthx
;in: al = data
;out: none
;dest: ax, flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
prthx proc near
push ax
shr al, 1 ; shr al, 4
shr al, 1
shr al, 1
shr al, 1
call asc
pop ax
and al, 0fh
call asc
ret
prthx endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; asc
;in: al = data
;out: none
;dest: al, flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
asc proc near
add al, '0'
cmp al, '9' + 1
jc @f
add al, 7
@@: call prnt
ret
asc endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; prtbx
;in: bx = data
;out: none
;dest: al, flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
prtbx proc near
mov al, bh
call prthx
mov al, bl
call prthx
ret
prtbx endp
CODE ends
;==========================================================
; data segment
;==========================================================
DATA segment para public
cmos equ $
db 1000h dup (?)
msg db 'FM Series C-MOS data display Version 1.00B'
crlf db 13, 10, '$'
DATA ends
;==========================================================
; stack segment
;==========================================================
STACK segment para public
dw 128 dup(?)
spoint equ $
STACK ends
end main