翻蚳è ã®ã¿ãããŸã
éçºããŒã ã§ä»äºãå§ããŠããã«ããããŸãã«èšã£ãŠPDP-11ã®1806BM2ã®ã¢ã»ã³ãã©ã«åºäŒããŸããã ããã«ãã¿ãŒã²ããããã€ã¹ã¯ãä¿¡å·ãå€æããã³åŠçããããã®å°æ°ã®éšåãåããç¹å®ã®ããŒãã§ãããæ©åšã¯WindowsïŒãªãã·ã§ã³ãªãïŒãåããPCã§ãã éçºäžã®ããã€ã¹ã¯ç°ãªãããããã®ããã°ã©ã ã¯300ã3000è¡ã®ã³ãŒãã§ãã
ãã®ããã»ã¹ã«åå ãããšããããã€ã¹åã®ãã©ã«ããŒããããžã§ã¯ãã«å¯Ÿå¿ããŠããããšãããããŸããã ãã©ã«ããŒã«ã¯ãã¢ã»ã³ãã©ãŒãã¡ã€ã«ïŒãã¹ãŠã®asmãã¡ã€ã«ã¯åãååãæã¡ãã³ã³ãã€ã«ã¯ãã®ããã«æ§æãããŠããŸãïŒããã©ã¡ãŒã¿ãŒãªãã®batãã¡ã€ã«ãããããã©ã¡ãŒã¿ãŒä»ãã®å¥ã®batãã¡ã€ã«ãåŒã³åºãã次ã«ãã¢ã»ã³ãã©ãŒexeãã¡ã€ã«ãå®è¡ããŸãïŒèªç¶ã«æšªããã£ãŠããŸãïŒããããïŒã ããã«ããããžã§ã¯ããã©ã«ããŒã«ã¯ããã€ããªãšãªã¹ãããã€ããªãROMãã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ã«å€æããããã°ã©ã ãå€æçšã®è£å©ããã¹ããã¡ã€ã«ããã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ãããã°ã©ããŒãç解ã§ãã圢åŒã«å€æããå¥ã®ããã°ã©ã ããã¡ãŒã ãŠã§ã¢ãã¡ã€ã«ïŒããã°ã©ã ã¯ROMã®ä»£ããã«ãã©ãã·ã¥ã«æžã蟌ãŸãå§ããŸããïŒãããã«dirinfo.txtã§ã誰ããäœããæžãããšã¯éåžžã«ãŸãã§ããã
äœæ¥ã¯æ¬¡ã®ããã«ãªããŸãããã³ã³ãœãŒã«ãã¡ã€ã«ãããŒãžã£ãŒã§ã¯ãçµã¿èŸŒã¿ãšãã£ã¿ãŒã«ãã£ãŠããã°ã©ã ããã¹ããä¿®æ£ãããŸããã ç·šéåŸãæåã®ããããã¡ã€ã«ãèµ·åãããŸããïŒæ··åããªãããšãéèŠã§ãïŒïŒã 次ã«ãã³ã³ãœãŒã«åºåã®ãšã©ãŒã確èªããŸãã æ§æäžã®åŠšå®³ããªãå Žå-ããã°ã©ã ã¯ROMãšãã¥ã¬ãŒã¿ãŒã«æµã蟌ãŸããããŒããŠã§ã¢ã®æäœæ§ããã§ãã¯ããŸãã ãã®ãããããã°ã©ã ã¯è¿œå ãããæåŸ ãããåäœãéå§ãããŸã§ãã§ãã¯ãããŸãã 次ã«ãçæããããã¡ãŒã ãŠã§ã¢ãROMã«æžã蟌ãŸããŸãïŒåŸã§ãROMããã©ãã·ã¥ã«çœ®ãæããããŸããïŒã
æåã¯ãã€ãã®ããã«åããŸããã å©äŸ¿æ§æ¬¡ç¬¬ã§ã¯ãããŸããã§ãããã³ãã³ãã·ã¹ãã ãããã°ã©ã äœæã®æ©èœããœãããŠã§ã¢ãèšè¿°ãããŠããããã€ã¹ã®ããŒããŠã§ã¢ãç解ããå¿ èŠããããŸãã äœããå€æãå§ãããšãæ¹åã®èããçãå§ããŸããã ãŸããæ§æã®åŒ·èª¿è¡šç€ºããšãã£ã¿ãŒããã®ã³ã³ãã€ã©ãŒã®èµ·åãããã³éåžžã®æ€çŽ¢ãšçœ®æãå¿ èŠã§ããã
éžæã®å°éºŠç²
æåã¯ãããããçš®é¡ã®ã€ã³ã¿ãŒãããã§IDEãèŠã€ããããšããŸãããããã¯PDP-11ãã€ãŸãDCKãBCãUKSCã§ãããèŠã€ããã¹ããã®ãããã¯ãã ããã§ãïŒ ãããŠçºèŠãããŸããããUKSCã®ãšãã¥ã¬ãŒã¿ã§ã®ã¿æ©èœããŸããã ã³ã³ãœãŒã«IDEããšãã¥ã¬ãŒã¿ãç°å¢ã«ããšãã¥ã¬ãŒã¿ãå®è¡ããå¿ èŠããããŸããã§ããããããã¯æãéèŠãªããšã§ã¯ãããŸããã§ããã ææªãªããšã«ãçµæã®ãã€ããªã¯ãåŸæ¥ã®æ¹æ³ãã§äœæããããã€ããªãšã¯ç°ãªããŸããã ç§ã¯çç±ãç解ããŠããŸããã§ãã-ãšãã¥ã¬ãŒã¿ãŒã§åžå°æ§ãçµäºããããããã«æªãããšã«ä¿®æ£ãœãããŠã§ã¢ãæžãã®ã«ååã§ã¯ãããŸããã§ããã ç§ã¯å¥œã¿ãšé女ã§èªåã®ã¯ãŒã¯ã¹ããŒã¹ãæŽçããããšã«ããŸããã
ç§ã¯ãã£ââãšçå£ã«ããã¹ããšãã£ã¿ãæ¢ãå§ããŸããã æ€çŽ¢ããã»ã¹ã§åºäŒã£ãããšãããç§ã¯UltraEditãäžçªå¥œãã§ããïŒç¹ã«UEStudioããŒãžã§ã³ïŒã ããã¹ããã¡ã€ã«ã®æ¯èŒããã©ã³ã¹ã³ãŒãã£ã³ã°ãåéžæãã³ã³ãã€ã©ã ãã§ãªããçŸåšã®ãã¡ã€ã«ã®ååã䜿çšããŠäœæäžã®ãã®ä»ã®ãã¯ããããŒã«ããŒæ¡åŒµæ©èœã®èµ·åãªã©ãããã€ãã®å©ç¹ããããŸããã ãã¹ãŠãè¯ãã§ã-ããããæ¯æããããããŠç§ã®åå ¥ã¯å®ãã¯ãããŸããã ç§ã¯MiBEditorãè©ŠããŸãã-å°è±¡çãªè£œåïŒç¡æã§1ã€ã®ãã«ã¡ããã§äœãããŠããŸãïŒã§ãããããã§ã¯ãããŸããã ç°¡åãªLinuxã®æµè¡ãå©ããŸããã VIMã«ã€ããŠåŠã³ãããã䜿çšããŠã¿ãŠããã®æ©èœãæç¥ããWndowsã®ããŒãžã§ã³ãçºèŠããŸããã
ããªã»ãã
æåã«è¡ã£ãã®ã¯ãvimrcã§å€èŠ³ãšåäœãèšå®ããããšã§ããïŒæããŠã©ã³ãããã«ã©ãŒã¹ããŒã ïŒé»ã«æããã°ã¬ãŒã奜ã¿ã«å¿ããŠèª¿æŽïŒãè¡çªå·ãè¡çªå·ãã¹ããŒãã€ã³ãã³ããã¿ãã«ããããã©ã«ãã§85å¹ ã«å¢å ãç¡å¹ãªbak-filesãéããŠãããã¡ã€ã«ã«ããäœæ¥ãã©ã«ããŒã®èªåå€æŽã 圌ã¯ãããŒãé³ã§ã¯ãªãç¹æ» ããä»®æ³åŒã³åºãããªã³ã«ããããŒã«ããŒãç¡å¹ã«ãïŒäœããã®çç±ã§ãç§ã¯äœ¿çšããŠããŸããããã¡ãã¥ãŒãæ®ããŸããïŒãå°å·äžã«ããŠã¹ãé ããéããŠããåå²ãããã¡ãŒéã§Ctrl-Tabã¹ã€ãããåããŸããã
ãã·ã¢èªã®æåãå«ããã©ã³ããéžæããŸããïŒ
set guifont=Courier_New:h10:cRUSSIAN "
ãã·ã¢èªã§ã®äœæ¥ã䟿å©ã«ããããã«ãã¬ã€ã¢ãŠãã«äœããè¿œå ããŸããã
set keymap=russian-jcukenwin " set iskeyword=@,48-57,_,192-255 " . . set iminsert=0 " - - set imsearch=0 " â lang ctype Russian_Russia.1251
F12ã«ã¬ã€ã¢ãŠãã¹ã€ãããæããŸããïŒ
imap <F12> <C-^> cmap <F12> <C-^>
çŸåšãè±èªã¬ã€ã¢ãŠãã§ã¯ããã¹ãŠã®ããŒããŒãã³ãã³ããæ£åžžã«æ©èœããã·ã¹ãã ã®Ctrl-Shiftã§ã¯ãªãå ¥åèšèªãåãæ¿ããå¿ èŠããããŸãããVIM F12ã§ã¯ãçŸåšã®èšèªãè±èªã§
äžèšã®ãã¹ãŠãåå¥ã®vimrc_rgã«èšé²ããããã©ã«ãã®èšå®ãã¡ã€ã«ã«æ¥ç¶ããŸããã
source $VIM/_vimrc_rg
è€æ°ã®ãã©ã°ã€ã³ãã€ã³ã¹ããŒã«ããŸããããåžžã«æåéã1ã€ã䜿çšããŸã-QuickBufïŒqbuf.vimãscript_id = 1910ïŒãããã«ãããF4ã§1ã€ã®ãŠã£ã³ããŠã®ãªãŒãã³ãããã¡ãŒãåãæ¿ããããšãã§ããŸãã çŸåšãã¿ãã¯å¿ èŠãããŸããïŒUltraEditã§æ £ããŠããŸããïŒãããã«äžå¿«ã«æããŸãã UltraEditã®ããã«ãéžæããããã¯ããŒã¯ãäœæããã€ã³ã¹ããŒã«æžã¿ã®ããžã¥ã¢ã«ããŒã¯ïŒscript_id = 1026ïŒãæã èŠããŠããŸãã
ããã§ãVIMããã¬ãŒã³ããã¹ããã¡ã€ã«ã®ã¡ã€ã³ãšãã£ã¿ãšããŠäœ¿çšãå§ããŸããã ç§ã®èŠä»¶ã®1ã€ã§ããéåžžã®æ€çŽ¢ãšçœ®æã¯ãããã«äœ¿çšã§ããŸãã䜿çšæ¹æ³ãåŠãã§ãã ããã ããã«ãå€ãã®èšèªã®åŒ·èª¿è¡šç€ºãšèªåã€ã³ãã³ã-ããããã¡ã€ã«ã®ç·šéãªã©ãéåžžã«äŸ¿å©ã«ãªããŸããã
ããã¯ã©ã€ããšç¿»èš³è ã®èšå®
次ã«ãç·šéã匷調衚瀺ããŠåã蟌ãããã®æ°ãããã¡ã€ã«ã¿ã€ãa1806ãå°å ¥ããŸããã vimfilesãã©ã«ããŒã®ã«ãŒãã«filetype.vimãã¡ã€ã«ãäœæããŸããã
augroup filetypedetect au BufNewFile,BufRead *.msa setf a1806 au BufNewFile,BufRead *.a51 setf asm8051 augroup END
ãããããã°ããã®éã圌ã¯ã¢ã»ã³ãã©ãŒãã¡ã€ã«ã«é©åãªæ¡åŒµåãäžãå§ããŸãã-1806ã®msaãMCS-51ã¢ã»ã³ãã©ãŒã®a51ãããã©ã«ãã§Intelã¢ã»ã³ãã©ãŒã«èšå®ãããasmãšæ··åããªãããã«ã
次ã«ãvimfiles \æ§æã§ã圌ã¯a1806.vimãã¡ã€ã«ãäœæããä»ã®èšèªã®ãã€ã©ã€ããã¡ã€ã«ããããçŽããŸããã ã€ã³ã¿ãŒãããã§èŠã€ãã£ãããŒã¯ãŒããPDP-11ã®ããã¹ãæ å ±ã UKNTSããã³SMã³ã³ãã¥ãŒã¿ã«é¢ããããŒããŒããã¯ãããã€ããããŸãããWebããŒãžããã³ããŒããæ¹ãç°¡åã§ãã
ãã®ãã¡ã€ã«ã«ã¯ãç¹ã«æ¬¡ã®è¡ãå«ãŸããŠããŸãã
syn match a1806Error "#@.*\|[a-zA-Z0-9_$]\{7,}:"
ãã°ããå ¥åããŠéæ¥ã¢ãã¬ã¹ãå ¥åãããšãã@ïŒãšïŒ@ãæ··åããããšãããããããã®ãã¿ãŒã³ã¯å ¥åäžã®ãšã©ãŒã匷調ããŠããŸãã ä»ã®äžè¬çãªã¿ã€ããã¹ã¯ããã®æ¹æ³ã§ç¹å®ã§ããŸãã
æ§æã®åŒ·èª¿è¡šç€ºããããŸãã ä»ã³ã³ãã€ã«ã ãŠãŒãã£ãªãã£makeãšctagsãç解ãããšãããã§ã¯ãããããã«ããŒã§ã¯ãªãããšãæããã«ãªããŸããã ã¢ã»ã³ãã©ã¯ãããŸããããªã³ã«ã¯ãããŸãã-ãããžã§ã¯ããã¢ãžã¥ãŒã«ãã¡ã€ã«ã«åå²ããããšã¯ã§ããŸããã makeã®ç®æšã¯1ã€ã ãã§ããã®ããã®ãã¡ã€ã«ããããŸãããæ°ã«ããå¿ èŠã¯ãããŸããã ctagsã§ãåãã§ã-ãã¡ã€ã«ã¯1ã€ã ãã§ãæ€çŽ¢ããç¹å¥ãªãã®ã¯ãããŸãããã©ãã«ã¯ã¢ã¹ã¿ãªã¹ã¯ã§ç°¡åã«èŠã€ãããŸãã é·ããã¡ã€ã«ã¯ããã¯ããŒã¯ããã䟿å©ã§ããããã¯VIMã«ããããŸãã ãããããã¹ãŠã®ãããžã§ã¯ããã©ã«ããŒã®ã¢ã»ã³ãã©ãŒã¯fiã§ãïŒ CïŒ\ãã©ã€ãã®ã«ãŒãã«binãã©ã«ããŒãäœæããPATHã«æžã蟌ã¿ãŸãïŒå¥ã®ã¢ã»ã³ãã©ãŒã®makeãšctagsãããã«é 眮ããŸãïŒã ããã§ãã¢ã»ã³ãã©ãŒãšmk1806.batãé 眮ããŸããããã€ã¯ããã«ããšæž¡ããããã©ã¡ãŒã¿ãŒã®æå¹æ§ã®ãã§ãã¯ã«å ããŠããã€ããªãšãªã¹ããæ¶å»ããããã®åŸã¢ã»ã³ãã©ãŒãåŒã³åºãããŸãã
:VALIDDIR CD %2 %3 %4 %5 %6 %7 %8 %9 :WORK2 if not exist *.bin goto NOBIN attrib -r *.bin del *.bin :NOBIN if not exist *.lst goto NOLST attrib -r *.lst del *.lst :NOLST if exist %1 C:\bin\cmplr1806\asm.exe %1 -m if not exist %1 echo Error: File %1 not exist!
ããããã¡ã€ã«ã¯ããã¡ã€ã«ã®ååãšãã®ãã¹ã®2ã€ã®ãã©ã¡ãŒã¿ãŒãåãå ¥ããŸãã makeã®åºåãæãªããªãããã«ããã¡ã€ã«å ã®ã³ãã³ãã衚瀺ããã¢ãŒãã¯ç¡å¹ã«ãªã£ãŠããŸãïŒ@ ECHO OFFïŒã
vimfiles \ ftpluginã§a1806.vimãã¡ã€ã«ãäœæããŸããã
" Language: 1806 assembler " Maintainer: " Last Change: " lcd %:h " setlocal makeprg=C:\bin\mk1806.bat\ %:t\ %:p:h " setlocal autowrite nmap <buffer> <F9> :make<CR> imap <buffer> <F9> <Esc>:make<CR> " set efm=%-G,%-G\ BK-10/11%.%#,%-P\ Opened\ %f,%Eline\ %l\\,%.%#,%Z%m,%-GFile\ compiled%.%#
Errorformatã¯çµéšçã«æ±ºå®ãããŸããïŒasm.exeã«ã¯ããã¥ã¡ã³ãããŸã£ãããããŸããïŒãã€ãŸãããšã©ãŒãªãã§ããŸããŸãªç¹å¥ãªãšã©ãŒãå«ããã¡ã€ã«ã®ã¢ã»ã³ãã«ãéå§ããã³ã³ãœãŒã«åºåã調ã¹ãVIMãã«ãã®ãã³ãã¬ãŒããã³ã³ãã€ã«ããŸããã
ãšã©ãŒåºåã®äŸïŒæ確ã«ããããã«è¡çªå·ãæåã§è¿œå ïŒïŒ
1 2 BK-10/11 Assembler 3 4 Opened 1.ASM 5 Line 61,Address 000320: 6 Bad operator [AKSJDFH]. 7 Opened 1.lst 8 9 File compiled 346 bytes. 10
ãã®å Žåããšã©ãŒåœ¢åŒã¯æ¬¡ã®èŠçŽ ã§æ§æãããŸãã
- ïŒ -Gã-空è¡ãçºçããŠãç¡èŠããŸãã ïŒãGãã¯äžè¬æ å ±ã§ããããïŒ -ãã¯åºåããé€å€ãããŸãããGãã®åŸã«äœã衚瀺ãããªãå Žåã¯ã空ã®è¡ãæå³ããŸãïŒã 1ã3ã8ãããã³10è¡ã«é©çšãããŸãã
- ïŒ -G \ BK-10 / 11ïŒ ãïŒ ïŒããã㧠'ïŒ ãïŒ ïŒ'ã¯æ£èŠè¡šçŸãã¿ãŒã³ 'ã*'ã®äœæã«äœ¿çšãããŸããã€ãŸãããBK-10 / 11ãã§å§ãŸãè¡ïŒã³ãã³ããïŒsetãã¯ã\ãã§ãšã¹ã±ãŒããããç¡èŠãããŸãã 2è¡ç®ã«é©çšãããŸãã
- ïŒ -P \ Opened \ïŒ fã-åèªãOpenedãã®åŸã®ãã¡ã€ã«åïŒïŒ fïŒãæã€åäžè¡ã¡ãã»ãŒãžïŒïŒ -PïŒã解æããŸãããïŒ -Pãã¯è¡ã衚瀺ãããªãããšã瀺ããŸããããã¡ã€ã«åãèŠããŠããŸãã次ã®ãšã©ãŒããã«é¢é£ããŸãã 4è¡ç®ãš7è¡ç®ã«é©çšãããŸãã
- ïŒ Eline \ïŒ l \\ãïŒ ãïŒ ïŒã-è€æ°è¡ãšã©ãŒã¡ãã»ãŒãžïŒïŒ EïŒã®å§ãŸãããlineãã®åŸã«è¡çªå·ïŒïŒ lïŒãç¶ããã«ã³ãïŒã\\ãã-ã³ã³ãããšã¹ã±ãŒãããå¿ èŠããããŸãïŒããã¯ã¹ã©ãã·ã¥ããã ãããïŒsetãã³ãã³ãã§è€è£œããå¿ èŠããããŸãã次ã«ãåºåã«é¢ä¿ããè¡ïŒãïŒ ãïŒ ïŒã=ãã*ãïŒïŒãã®äŸã§ã¯ãã¢ãã¬ã¹ã§ãããæ°åãšããŠè¡šç€ºãããŸãïŒãšã©ãŒ-ã320ãšã©ãŒããããã¯ãã°ã§ã¯ãªãæ©èœã§ãã
- ïŒ ZïŒ mã-å®éã®ãšã©ãŒã¡ãã»ãŒãžïŒïŒ mïŒãå«ãè€æ°è¡ã¡ãã»ãŒãžïŒïŒ ZïŒã®çµããã ã¿ã€ã5ãš6ã®è¡ãã¢ã§ã¯ãïŒ Eãã¿ãŒã³ãšïŒ Zãã¿ãŒã³ãé£åããŸãã
- ïŒ -GFile \ compileïŒ ãïŒ ïŒç¹°ãè¿ããŸãããåºåããã¹ããŒãããäžè¬çãªæ å ±ã9è¡ç®ã®ã«ãŒã«ã
efmãã¿ãŒã³ã«ããã°ããã¡ã€ã«åã¯4ãš7ã«æ ŒçŽãããŠããŸãããè¡1..4ãš7..10ã¯åºåãããŸããã è¡5ãš6ããªãå Žåãåºåã¯ç©ºã§ããšã©ãŒã¯ãããŸããã ã¿ã€ã5ãš6ã®ã©ã€ã³ã¯ãè€æ°ã®ãã¢ã«ãªãå ŽåããããŸãã ãããã®ãã¢ã®ããããããšã©ãŒã¡ãã»ãŒãžãªã¹ãã¢ã€ãã ã圢æããŸãã
ã»ãïŒ F9ã§èªåä¿åã䜿çšããŠã³ã³ãã€ã«ããŸãã æ§æãšã©ãŒãæ€åºããããšãVIMã¯ããã«ãèŠã€ãã£ããšã©ãŒã®ãªã¹ãã®æåã®ãšã©ãŒã«å¯Ÿå¿ããã³ãŒãè¡ã«ã«ãŒãœã«ã眮ããŸãã
ååãªãããã¬ã¯ãããŸããããããŸãã«ãå€ãã®ãã®ãå²ã蟌ã¿ãã¡ã¢ãªãžã®çŽæ¥ã¢ã¯ã»ã¹ãããã³ç¡é¢ä¿ãªããŒããŠã§ã¢ã«çµã³ä»ããããŠãããããããã§ã¯åœ¹ã«ç«ã¡ãŸããã VIMã«çµã¿èŸŒãŸããŠããå®å šãªãã¡ã€ã«æ¯èŒããŸã ãã¹ã¿ãŒããŠããŸãããäž»ã«WinMergeã䜿çšããŠããŸãã ããã§ããããã¯ã¯ããã«äŸ¿å©ã«ãªããŸããã
ãšã³ãã¯ãŒã¡ã³ã
ãããŠ1806幎ã¯ç§ãã¡ããå°ãé¢ãå§ããNM6403ããã»ããµãããŒã¹ã«ããããã€ã¹ã§äœæ¥ãå§ãŸããŸããã ã¢ã»ã³ãã©ãŒã§ãã ãããŠããœãŒã¹ãã¡ã€ã«ã®æ¬¡ã®æ¡åŒµåãæãä»ããªãããã«ãasm.vimãã¡ã€ã«ãvimfiles \ ftpluginã«è¿œå ããŸããã
if getline(1) =~ '^;.*a1806\>' set filetype=a1806 endif if getline(1) =~ '^//.*a6403\>' set filetype=a6403 endif
æ¡åŒµåã.asmã®ã¢ã»ã³ãã©ãã¡ã€ã«ã§ã¯ãæåã®è¡ã®å ¥åãéå§ãããŸãã
ã; A1806ããŸãã¯ã// a6403ãã vimfiles \ syntax \ a1806.vimïŒãã¢ã»ã³ãã©ãŒèšèªã®èª¬æãã«åŸã£ãŠéåžžã«ç°¡åãã€è¿ éã«èšè¿°ïŒããã³ãã®ãããªvimfiles \ ftplugin \ a6403.vimã匷調ããæ§æãè¿œå ããŸããã
" Language: 6403 assembler " Maintainer: " Last Change: setlocal makeprg=c:\bin\make.exe " lcd %:h " setlocal autowrite nmap <buffer> <F9> :make<CR> imap <buffer> <F9> <Esc>:make<CR> nmap <buffer> <F10> :make TAGS<CR> imap <buffer> <F10> <Esc>:make TAGS<CR> set efm=\"%f\"\\,%l\ :\ %m
ãããæ©èœããããã«ã圌ã¯åãããžã§ã¯ããã©ã«ããŒã«ãããä»ã®éçºè ã䜿çšããbatã³ã³ãã€ã©ãŒèµ·åãã¡ã€ã«ã«é£æ¥ããMakefileãäœæããŸããã ç§ã®Makefileã«ã¯ãTAGSã¿ãŒã²ãããšãALLã¿ãŒã²ãããããã®ã¿ãŒã²ãããžã®åŒã³åºãããããŸãã
TAGS : @c:/bin/ctags.exe --options=c:/bin/a6403.ctags $(SRC_ASM) *.asi
$ïŒSRC_ASMïŒã¯ASMãœãŒã¹ããªã¹ããã* .asiã«ã¯ã€ã³ã¯ã«ãŒããã¡ã€ã«ãå«ãŸããŸãã
äžèšã®ãã©ã«ããŒCïŒ\ binã«ã¯ãmake.exeãctags.exeãa6403.ctagsããããctags.exeã®ãã©ã¡ãŒã¿ãŒãšããŠæž¡ãããŸãã
--langdef=a6403 --langmap=a6403:.asm --language-force=a6405 --regex-a6403=/^<([a-zA-Z0-9_]+)>/\1/L,labels/ --regex-a6403=/^[ \t]*const[ \t]+([a-zA-Z0-9_]+)/\1/C,consts/ --regex-a6403=/^[ \t]*#define[ \t]+([a-zA-Z0-9_]+)/\1/D,defs/ --regex-a6403=/^[ \t]*global[ \t]+([a-zA-Z0-9_]+)[ \t]*:[ \t]*(word|long)/\1/V,vars/
ç®±ããåºããctagsã¯ãNM6403ã«ã€ããŠäœãç¥ããŸããã æåã®è¡ã¯ãæ°ããèšèªåãå®çŸ©ããŸãã 2è¡ç®ã¯ãã¡ã€ã«æ¡åŒµåã«ã€ããŠèª¬æããŠããŸãã æ¡åŒµåã¯ãããšãã°ã.asm.asi.incãã®ããã«é£ç¶ããŠèšè¿°ãããŸãã åŸãã«æåããªããããã¯ãæ¡åŒµåã®ãªããã¡ã€ã«ã®äœ¿çšãæå³ããŸãã ãã ããããã¯ç¹ã«äŸ¿å©ãªãªãã·ã§ã³ã§ã¯ãããŸãããããã§ã¯.asiæ¡åŒµåãæå®ããŸããã§ããããctagsãåŒã³åºããšãã«* .asiãæå®ããŸããããŠãŒãã£ãªãã£ã¯å¿ èŠãªãã®ããã¹ãŠã¹ãã£ã³ããŸããã 4è¡ç®ã§ã¯ãåãæ¡åŒµæ©èœã®ctagsã«çµã¿èŸŒãŸããŠããèšèªã§ã¯ãªãããã®ç¹å®ã®èšèªã«å¯ŸããŠäžèšã®æ¡åŒµæ©èœã䜿çšããŠããŸãã æ®ãã®è¡ã¯ãã<Label>ããšãã圢åŒã®ã©ãã«ããconst Nameããšãã圢åŒã®å®æ°ããïŒdefine Expressionããšãã圢åŒã®ãã¯ãå®çŸ©ãããã³ãglobal NameïŒwordããšãã圢åŒã®ã°ããŒãã«å€æ°ããããã説æããŸãã ãã ããã§ãgf-go fileã³ãã³ããã«ãŒãœã«ã®äžã®ååãã€ã³ã¯ã«ãŒããã¡ã€ã«ã衚瀺ããã®ã«éåžžã«äŸ¿å©ãªãã¡ã€ã«ãžã®ç§»è¡ãæãåºããããšæããŸãã
å¥ã®åŸ®åŠãªç¹ïŒIDEãå«ãããã€ãã®ç°ãªãéçºããŒã«ãäœæ¥ã³ã³ãã¥ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ãããŸãã ãããã®ããã€ãã¯ããŒãäžã«ç¬èªã®makeãæã¡ããããã®ãã€ããªãžã®ãã¹ã¯ã€ã³ã¹ããŒã«äžã«PATHã§æå®ãããŸãã ããã«ãäžéšã®makeã¯ãGNU makeã®èŠåã«åŸã£ãŠäœæãããMakefileã«ç¥çµè³ªã«é¢é£ããŠããŸãã äžè¬ã«ããããã¯ããããã¡ã€ã«ã§ãã£ãŠãããŸããŸããã ãã®ããã䜿çšããmakeïŒããã³åæã«ctagsïŒãžã®ãã¹ãã©ãã«ã§ãæžããªããã°ãªããŸããã§ããã次ã®IDE / CADãã€ã³ã¹ããŒã«ãããã³ã«PATHã䞊ã¹æ¿ããŠå¶åŸ¡ãããããç°¡åã§ä¿¡é Œæ§ãé«ãã§ãã
åèš
ä»ã§ã¯ããã¡ã€ã«æ¡åŒµåãæ°ã«ããã«ããŸããŸãªã¢ã»ã³ãã©ã§äœæ¥ããããŸããŸãªãã¡ã€ã«ã«æ£ãã°ã£ãŠããã³ãŒããããžã£ã³ãããããšãã£ã¿ãé¢ããã«ã³ã³ãã€ã«ããã³ã³ãã€ã«åŸã«æ§æãšã©ãŒã®ããè¡ãååŸããæ©äŒããããŸãã é¡æšã«ãããVIM +翻蚳è + ctagsãã³ãã«ã®ç¯å²ãä»ã®èšèªãšäžç·ã«äœ¿çšããå¿ èŠãããå Žåããããã®ç¯å²ãéåžžã«ç°¡åã«æ¡åŒµã§ããŸãã é©åãªãã©ã°ã€ã³ãéžæããããšã«ãããã¿ã°ã®æäœã«å©äŸ¿æ§ãè¿œå ã§ããŸãã Makefileã䜿çšããŠç®çã®ãã©ã³ã¹ã¬ãŒã¿ãŒã«ãã¥ãŒãã³ã°ããŠmakeãåºå®ã§ããŸããçŽæ¥ãã©ã³ã¹ã¬ãŒã¿ãŒã䜿çšããããšãã§ããŸãã ãã¡ãããIDEã§ã¯ãããŸããããããŒãããã¯ã§ããããŸããïŒ
ããŒã ã ãã§VIMãšctagsã®äŸ¿å©ããšãã¯ãŒã䜿çšããã®ã¯å°ãæ®å¿µã§ãã 誰ã倢äžã«ãªããŸããã§ããã 誰ãããããã®éçºã圹ç«ã€ãšæãã§ããããïŒ
PSæåŸãŸã§ãã¹ã¿ãŒããçããã«æè¬ããŸãã