復活!CP/M ワンボードマイコンでCP/Mを!
CP/MがTK−80互換のワンボードマイコンの上で復活します
ND80ZVとMYCPU80の上でCP/Mが走ります!
[第49回]
●FILL00プログラム(2)
前回からの続きです。
仮CP/Mシステムのトランジェントエリア8100H〜87FFHに00を書き込む簡単なプログラムFILL00.TXTをND80ZV附属のZ80アセンブラZASM.COMでアセンブルして、FILL00.BINファイルを作ります。
その後、ND80ZVをUSB接続して、ZB3[Enter]を実行しました。
ZASMの実行によってマシン語のバイナリファイルfill00.binが作成されました。
同時に作成された、アセンブルリストです。
2012/3/2 19:59 fill00.txt END=808F ; FILL 00 8100-87ff ; ORG $8080 REENT=$1033 ; 8080 210081 LD HL,$8100 8083 0600 LD B,00 8085 70 LOOP:LD (HL),B 8086 23 INC HL 8087 7C LD A,H 8088 FE88 CP 88 808A C28580 JP NZ,LOOP 808D C33310 JP REENT ; LOOP =8085 REENT =1033 |
logfile nd80zlog\03021959.txt open ND80ZVに接続しました 0001 0000 - z 1000 00C3 - *** nd80z3 basic **** >/ld fill00.bin,8080 loading FILL00.BIN ...0010(16)bytes loaded,from 8080 to 808F >jp 8080 >dm 8100,817f 8100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ >dm 8780,87ff 8780 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 8790 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 87A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 87B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 87C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 87D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 87E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 87F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ |
>/ld ftest4-1.txt,8100 loading FTEST4-1.TXT ...02c3(707)bytes loaded,from 8100 to 83C2 >dm 8300,83ff 8300 20 4E 5A 2C 4C 4F 4F 50-32 0D 0A 20 20 20 20 20 NZ,LOOP2.. 8310 20 20 20 4A 50 20 4C 4F-4F 50 31 0D 0A 3B 0D 0A JP LOOP1..;.. 8320 45 52 52 3A 4C 44 20 44-45 2C 45 52 52 4D 53 47 ERR:LD DE,ERRMSG 8330 0D 0A 20 20 20 20 20 20-20 20 4C 44 20 43 2C 30 .. LD C,0 8340 39 0D 0A 20 20 20 20 20-20 20 20 43 41 4C 4C 20 9.. CALL 8350 46 43 41 4C 4C 0D 0A 20-20 20 20 20 20 20 20 52 FCALL.. R 8360 45 54 0D 0A 45 52 52 4D-53 47 3A 22 63 61 6E 27 ET..ERRMSG:"can' 8370 22 0D 0A 20 20 20 20 20-20 20 20 22 74 20 6F 70 ".. "t op 8380 22 0D 0A 20 20 20 20 20-20 20 20 22 65 6E 22 0D ".. "en". 8390 0A 20 20 20 20 20 20 20-20 44 42 20 30 44 0D 0A . DB 0D.. 83A0 20 20 20 20 20 20 20 20-44 42 20 30 41 0D 0A 20 DB 0A.. 83B0 20 20 20 20 20 20 20 44-42 20 32 34 3B 24 0D 0A DB 24;$.. 83C0 3B 0D 0A 00 00 00 00 00-00 00 00 00 00 00 00 00 ;............... 83D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 83E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 83F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ |
>jp d233 a>dir A: FILLE5 COM : FTEST1 COM : FTEST2 COM : DM COM A: TEST COM : FTEST4 COM a>save 3 ftest4-1.txt a>dir A: FILLE5 COM : FTEST1 COM : FTEST2 COM : DM COM A: TEST COM : FTEST4 COM : FTEST4-1 TXT |
a>ftest4 ftest4-1.txt ; BDOS TEST4 TYPE ;2012/2/28 ; ORG $8100 FCALL=$8005 FCB=$805C RECNO=$807C DMA=$8080 ; LD C,0F;open LD DE,FCB CALL FCALL INC A;if FFH? JP Z,ERR XOR A LD (RECNO),A ; LOOP1: LD C,14;read LD DE,FCB CALL FCALL OR A RET NZ;read end ; LD HL,DMA LOOP2:LD E,(HL) LD C,02 PUSH HL CALL FCALL POP HL INC L JP NZ,LOOP2 JP LOOP1 ; ERR:LD DE,ERRMSG LD C,09 CALL FCALL RET ERRMSG:"can'" "t op" "en" DB 0D DB 0A DB 24;$ ; a>^D>a>^D> ERR:23 >0000 00C3 - リモート接続を終了しました logfile closed at Fri Mar 02 20:04:38 2012 |