(This is Shift JIS)[20250922]
FILENAME:edmitec.txt

edmi Zp
2025 wnc develop

edmiC(C99)̍\ɓK悤ɐ삵Ă܂B


t@C\(edmi v0.12 , 20250916)

main.c
 mainact.c   (main.cinclude)
 escsub.h    GXP[vV[PX̒`Ă
 maindef.h   vOŜɉel
 mainprot.h@֐錾
 sub98.h@@@pc-9801V[Yp̊֐錾

sub1.c@@@@ɕKvȊ֐
 escsub.h     ()
 maindef.h    ()
 mainprot.h   ()

sub98.c@@@@pc-9801V[Yp̊֐
 sub98.h      sub98.c̊֐錾
 maindef.h    ()
 escsub.h     ()

int24sub.asm  int24h

build.bat    edmi\z邽߂̃ob`t@C(wmakeĂяoĂ)
edmi.mak     edmi\z邽߂makefile(wmakep)

maindef.h
  edit_datŜɋʂϐŁA
    char *tmem eLXgi[Ă郁
    int tsize;   eLXgi[Ă郁̍ől
    int tusize;  eLXg̎gpTCY(̉ŗ,őtsize-1)
    int mypos;   ɑ΂ĕҏWĂs
    int mxypos;  ɑ΂ĕҏWĂ錅
    int oypos;   \Jn郁̍sʒu
    int sx;   ʕ\xW
    int sy;   ʕ\yW
    int bsx;  ʕ\xWobNAbv(ʏ͖gp)
    int bsy;  ʕ\yWobNAbv
    int scexec; ʕ`ɑ΂閽
    int tlinecnt; SsJEg
    int tab;  tab̃TCY(8܂4)

  TAB8SIZ tab̋8
  TAB4SIZ tab̋4
  TEXTMEMSIZ eLXgp̃TCY
  SCRMJIMAX ʂPső(p79)
  SCRGYOMAX ʍős(24s)
  SCRMJIMAXm1 SCRMJIMAX-1
  SCRGYOMAXm1 SCRGYOMAX-1

 PC-9801ŗL(int dcōĒ`Ɏgp)
  EDSCUP  0x1e  J[\
  EDSCDOWN 0x1f J[\
  EDSCLEFT 0x1d J[\
  EDSCRIGHT 0x1c J[\E
  EDSCDEL  0x7f  deleteL[
  EDSCRUP  0x19  [AbvL[
  EDSCRDN  0x14  [_EL[

  SC_ALL 0        ʑS
  SC_SYDAKE 1     ʍŝݏ
  SC_SENTOADD 2   ʐ擪sǉ(󔒍s)
  SC_SAIGOADD 3   ʍŏIsǉ(󔒍s)
  SC_CMIGISAI 4   ʉEJ[\ʒu(Ă珑)
  SC_CMIGISAIND 5 ʉEJ[\ʒu(Ȃŏ㏑)
  SC_CMIGILAST 6  gp
  SC_SYINS 7      SYsɋ󔒍sǉSYsĕ`
  SC_SYDEL 8      SYs폜
  SC_SONOMAMA 255 ʂȂ
  SC_DELTRUE 0    Oɏ(ŝ)
  SC_DELFALSE -1  OɏȂ(ŝ)

mainact.c
int mojisyori()
s܂BɖL[BS,DEL,^[,TABȂǂ
L[AȊO̕L[܂B
CtrlɊւL[main.cppōsĂ܂B
0nƉ߂܂(asciiR[h\0̂)B
0ŉȂƂ̂main̓œL[⏈ς݂ɂȂ
ꍇL[̖ŝ܂܃[v֑̌ƂӖ
Ă܂B
ǉłȂꍇ-1߂܂B

switchɂ镪sꂼꏈĂ܂B
BS_KEY:   BS
EDSCLEFT: 
EDSCDOWN: 
EDSCUP:   
CR_KEY:   ^[
EDSCRIGHT: 
EDSCDEL:  DEL
TAB_KEY:  TAB
0:   Ȃ
default:  1Ɋi[(Shift JISΉ)

eɑ΂scexecɉʏ̎w߂܂
maindef.hɉʏ߂defineĂ܂B

maindef.h(ȂƂ̐)
OUTCA    int29hgp`(1ŗL)
SCRGYOMAX \ső(24)
SCRMJIMAX \ő(79)

TEXTMEMSIZ eLXg̃TCY(16bit int̓s32767ʂő)

sub98.c
int dc Ɋւ鏈Ă܂B

static char pc98kdbuf SL[̏i[ꏊ(backupp)
L[́del,[Abv,[_EύXĂ܂B

escsub.h
GXP[vV[PX̒`Ă܂B
MS-DOS5.0A}jAɋLqĂ̂`Ă܂B

sub1.c iȂƂ̂݁j
cursor(x,y) ʂ̃J[\ʒux,yWɂ܂Bʍオx=0,y=0
ƂĂ܂BGXP[vV[PXł͉ʍオx=1,y=1ƂȂ悤
Ȃ̂ŕ␳Ă܂B

chksjis1b() {isleadbyte()gp΂悢̂łMS-DOS2.11
isleadbyte()쓮Ȃ̂chksjis1b()Ƃ̊֐
쐬Ă܂B

chksjismx() mxyposShift JIS̓rǂBmyposmxypos
܂łɌmxyposShift JISr肷B킴킴s
myposƂ̂mxyposOゾ݂ĂShift JIS킩Ȃ
sKׂ܂B

gettabscx() mxyposscreen x߂܂Bscreen x̓XN[
łxWŁAɊi[ĂtabvZŃJ[\ʒu
ϊ܂BʏłTABƊԂ␳Ă悤
܂ۂ̓J[\ړĂ邾ŕ\̓Xy[X
łB

mojioneins() eLXg1Ɋi[܂B
mojigyodel() 1폜܂(gp1)B
zigyoypos() ̍s̃ʒu擾܂B
zengyoypos() O̍s̃ʒu擾܂B

main.ciȂƂj
edmĩCĂ܂Bmain()͂̃t@Cɂ܂B
while()Ŗ[vɂĂ肱̒ŃL[͂Ă܂B
while()łESCCtrl+Q,Ctrl+E,Ctrl+SĂ肻ȊO
mojisyori()ɓnĂ܂B
Ctrl+L[switchɂ蕪򂵂ĂgpĂȂCtrl+L[
OĂ܂B
ŏɃt@Cǂݍ񂾎Aőǂݍ݃ȏゾƕύXs
ɂȂL[̂ݎ󂯕t܂B
܂ANCtrl+Cɂ鏈~𖳌Ă܂B
(Ctrl+P,Ctrl+NĂ܂)
---
̗
.ed1Ƃō\
.IvVΓǍ
.int 23h̊ݏint 23hɏ
.int 24h̊ݏint 24hɏ
.int dchɂL[@\ύX(PC-9801ŗL)
.t@Cw肪ΓǍ
.ed1̏

.while[vJn
..L[
..ESCL[̎L[obt@[j
..Ctrl+q̎whileo
..Ctrl+e܂Ctrl+s̎ۑ
..Ctrl+̏(܂łŏoĂȊO)
..[AbvE[_EL[̏
..mojisyori֐ɃL[̓f[^n
..ʂ̏
.[v̏I

.int dchɂL[ύXɖ߂
.int 23h݂߂
.int 24h݂߂
.DOS֖߂


edit_dat(typedef struct)
char *tmem   eLXg̃|C^[
int tsize    eLXg̃TCY
int tusize   eLXg̎gpTCY
int mypos    ݕҏW̍sJnʒu(tmem[0]0s0)
int mxypos   ݕҏW̍s+(myposɉZl)
int oypos    ʏ̊Jns(\N_0s0Ƃ)
int sx       ʃJ[\xW([0)
int sy       ʃJ[\yW([0)
int scexec   ʕ`施
int tlinecnt eLXg̑Ss
int tab      ^ũTCY(4܂8)

ʂ̏oyposƂSCRGYOMAX܂ŏo͂

̋Zpɂ
\tgEFÃ\[XMIT LicenseƓ̈ł肢܂B
ĩhLgCZX悭킩Ȃ߁j
