0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

誰でもわかるVZエディタ。harderr.asm

Last updated at Posted at 2025-05-05

祝VZエディタソースコード公開
https://qiita.com/kaizen_nagoya/items/baad23cf4a041ce845a9

祝:ソースコード公開:VZエディタ移植の方法と成果。註釈 coding(123)
https://qiita.com/kaizen_nagoya/items/5551be98dcbed8f41949

オープンソース化されたVZエディタをブラウザ上で動かしてみる
https://qiita.com/Takaraya/items/785ac9319c3934e30703

Github

vcraftjp/VZEditor
https://github.com/vcraftjp/VZEditor/

誰でもわかるVZエディタ。0から始める。
https://qiita.com/kaizen_nagoya/items/afe6c4cdccbfdd94baab

SRC

順次、ソースコードの解説、改良点などを追記予定。
source code
https://github.com/vcraftjp/VZEditor/tree/main/SRC

順次、ソースコードの解説、改良点などを追記予定。

ALIAS.ASM
BLOCK.INC
CHAR.ASM
CHKTSR.ASM
CORE.ASM
CTYPE.INC
DISP.ASM
DOS.ASM
EMS.ASM
EXPR.ASM
EZKEY.ASM
FILER.ASM
FROLL.ASM
GETS.ASM
HARDERR.ASM
INST.ASM
KEY.ASM
KEY98.ASM
KEYIBM.ASM
LEDIT.ASM
MACRO.ASM
MAIN.ASM
MEMO.ASM
MENU.ASM
MISC.ASM
MSG.ASM
OPEN.ASM
PRINTF.ASM
SCRN.ASM
SCRN98.ASM
SCRNIBM.ASM
SMOOTH.ASM
SPRINTF.INC
STD.INC
STRING.ASM
SWAP.ASM
TEXT.ASM
VIEW.ASM
VMAP.ASM
VZ.INC
VZSEL.ASM
WIND.ASM
XSCR.ASM
ZCOPY.ASM

VZ SRC bat, makefile
https://qiita.com/kaizen_nagoya/items/76bb4e851a0d94289f8d

harderr.asm

yarderr.asmではvz.incをincludeしている。
vz.inc ではstd.incをincludeしている。

VZ SRC INC
https://qiita.com/kaizen_nagoya/items/fc7c856991869f72cb90

harderr.asm
;****************************
;	'harderr.asm'
;****************************

	include	vz.inc

;--- Equations ---

HARDMSGCNT	equ	3

;--- External symbols ---

	wseg
	extrn	silent		:word
	endws

	extrn	mg_harderr	:byte
	extrn	mg_drive	:byte
	extrn	mg_abort	:byte

	extrn	csroff		:near
	extrn	loadwloc	:near
	extrn	newline		:near
	extrn	printf		:near
	extrn	putmg		:near
	extrn	resetint1	:near
	extrn	savewloc	:near
	extrn	setatr		:near
	extrn	setint1		:near
	extrn	skipstr		:near
	extrn	toupper		:near
	extrn	wait_key1	:near
	extrn	off_silent	:near

	dseg

;--- Local work ---

vct24		dd	0

	endds

	eseg

;--- Set/reset INT24h ---

	public	setint24
setint24 proc
	mov	bx,offset cgroup:vct24
	mov	di,24h*4
	mov	ax,offset cgroup:int24in
	mov	dx,cs
	call	setint1
	ret
setint24 endp

	public	resetint24
resetint24 proc
	mov	bx,offset cgroup:vct24
	mov	di,24h*4
	mov	dx,cs
	call	resetint1
	ret
resetint24 endp

;--- INT24h handler ---

int24in	proc
	pushm	<bx,cx,dx,si,di,bp,ds,es>
	movseg	ds,cs
	mov	dx,di
	push	ss:silent
	call	off_silent
	call	savewloc
	push	ax
	call	newline
	mov	al,ATR_MSG
	call	setatr
	pop	ax
	push	ax
	tst	ah
_ifn s
	mov	si,offset cgroup:mg_drive
	add	al,'A'
	cbw				; ##151.08
	push	ax
	mov	bx,sp
	call	printf
	pop	ax
_endif
	clr	cx
	mov	di,offset cgroup:mg_harderr
	movseg	es,cs
_repeat
	cmp	cl,dl
  _break e
	call	skipstr
	inc	cx
	cmp	cl,HARDMSGCNT
_while b
	mov	si,di
	push	dx
	mov	bx,sp
	call	printf
	pop	dx
	mov	si,offset cgroup:mg_abort
	call	putmg
_repeat
	call	csroff
	call	wait_key1		; ##156.113
	call	toupper
	mov	cl,al
	cmp	al,'A'
  _break e
	cmp	al,'R'
_until e
	call	newline
	pop	ax
	call	loadwloc
	pop	ss:silent
	cmp	cl,'R'
	jne	abort
	mov	al,1
	popm	<es,ds,bp,di,si,dx,cx,bx>
	iret
abort:
	msdos	54h
	mov	bp,sp
	or	byte ptr [bp+22*2],1
	mov	ax,INVALID
	add	sp,12*2
	popm	<bx,cx,dx,si,di,bp,ds,es>
	iret
int24in	endp

	endes
	end

;****************************
;	End of 'harderr.asm'
; Copyright (C) 1989 by c.mos
;****************************
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?