home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
Assembly
/
TEST23.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-09-25
|
876b
|
42 lines
CGROUP GROUP CODE_SEG, DATA_SEG
ASSUME CS:CGROUP, DS:CGROUP
CODE_SEG SEGMENT PUBLIC
ORG 100h
EXTRN WRITE_HEX:NEAR, WRITE_DECIMAL:NEAR
EXTRN WRITE_STRING:NEAR, SEND_CRLF:NEAR
EXTRN READ_DECIMAL:NEAR
TEST PROC NEAR
LEA DX,ENTER_PROMPT
CALL WRITE_STRING
CALL READ_DECIMAL
JC ERROR
CALL SEND_CRLF
LEA DX,NUMBER_READ_PROMPT
CALL WRITE_STRING
MOV DX,AX
CALL WRITE_DECIMAL
ERROR: CALL SEND_CRLF
INT 20h
TEST ENDP
CODE_SEG ENDS
DATA_SEG SEGMENT PUBLIC
ENTER_PROMPT DB 'Enter decimal number: ',0
NUMBER_READ_PROMPT DB 'Number read: ',0
; and now dummy variables
PUBLIC HEADER_LINE_NO, DISK_DRIVE_NO, HEADER_PART_1, HEADER_PART_2
PUBLIC PROMPT_LINE_NO, CURRENT_SECTOR_NO
HEADER_LINE_NO DB 0
DISK_DRIVE_NO DB 0
HEADER_PART_1 DB 0
HEADER_PART_2 DB 0
PROMPT_LINE_NO DB 0
CURRENT_SECTOR_NO DB 0
DATA_SEG ENDS
END TEST