rvtl ã®ã½ã¼ã¹ã³ã¼ã解説
rvtlã³ã³ãã¤ã©ã®ã½ã¼ã¹ã³ã¼ãã®è§£èª¬ãæ¸ãã¦ã¿ã¾ãããrvtlc ã¯ç°¡åãªã³ã³ãã¤ã©ã§ã½ã¼ã¹ã³ã¼ãã¯2000è¡ã»ã©ã§ããæ®éã®ããã°ã©ãã³ã°è¨èªã®ã³ã³ãã¤ã©ã§ã¯ãåå¥è§£æãæ§æ解æãæå³è§£æãã¨ã©ã¼å¦çãã³ã¼ãçæãæé©åããªã³ã¯ãªã©ã®ã¹ããããçµã¦å®è¡ãã¡ã¤ã«ã«å¤æãã¾ããrvtl ã¯ææ³ãç°¡åãªãããrvtl ã³ã³ãã¤ã©ã§ã¯ã½ã¼ã¹ã1æåãã¤èªã¿ãªãããç´æ¥å®è¡å½¢å¼ã«å¤æããããé常ã«é«éã«ã³ã³ãã¤ã«ã§ãã¾ããæè¿ã®PCãªãã°1åéã«100ä¸è¡ã®ã³ã³ãã¤ã«ãå¯è½ã¨æãã¾ããã»ã¨ãã©æé©åãã¦ããªãããå®è¡é度ã¯éãã¯ããã¾ããããæ°ãããã¤ãããæ°åãããã¤ãç¨åº¦ã®ã³ã³ãã¯ããªå®è¡ãã¡ã¤ã«ã¨ãªãã¾ãã
rvtlc.vtl 㯠rvtlä¸ã§åä½ãã rvtl ã§æ¸ãããã³ã³ãã¤ã©ã§ããLinuxã®å®è¡ãã¡ã¤ã«ãç´æ¥åºåãã¾ãããããã£ã¦ãªã³ã«(ld)ãã¢ã»ã³ãã©ãä¸è¦ã§ããåºåãããå®è¡ãã¡ã¤ã« ã¯ãã®ãã¡ã¤ã«åç¬ã§åä½ããlibcçã®å ±æã©ã¤ãã©ãªã¯ä¸è¦ã§ãã
ææ°çã®ã½ã¼ã¹ã®ãã¦ã³ãã¼ãã¯ãã¡ãã®ãã¼ã¸ããã
rvtlèªèº«ã§rvtlã®ã³ã³ãã¤ã©ãè¨è¿°ããæå³ã¯ä»¥ä¸ã®ããã«èãããã¨ãã§ãã¾ãã
1) ãªãªã¸ãã«è¨èªãèãã ä»å㯠rvtl ã¨ãã TINY BASICè¨èªç³»ã®è¨èªã§ãã 2) ãã®è¨èªã®ã¤ã³ã¿ã¼ããªã¿ãä½æ ã¢ã»ã³ãã©ã§ rvtl ã®ã¤ã³ã¿ã¼ããªã¿ãä½æãã¾ããã 3) ãã®è¨èªã®ã³ã³ãã¤ã©ã®ã½ã¼ã¹ãã¤ã³ã¿ã¼ããªã¿ã§ã³ã³ãã¤ã« rvtlè¨èªã§ã³ã³ãã¤ã©ã®ã½ã¼ã¹ãæ¸ãã¦ã¤ã³ã¿ã¼ããªã¿ã§ã³ã³ãã¤ã«ãã㨠rvtlè¨èªã³ã³ãã¤ã©ã®å®è¡å½¢å¼ã®ãã¡ã¤ã«ãã§ãã¾ãã 4) ã³ã³ãã¤ã«ãããã³ã³ãã¤ã©ã§ã³ã³ãã¤ã©ã®ã½ã¼ã¹ãã³ã³ãã¤ã« å®è¡å½¢å¼ã®rvtlã³ã³ãã¤ã©ã§ã³ã³ãã¤ã©ã®ã½ã¼ã¹ãã³ã³ãã¤ã«ã§ãããã¨ã 確èªãã¾ãããã®æç¹ããrvtlã³ã³ãã¤ã©ã®ã½ã¼ã¹ã®ã³ã³ãã¤ã«ã« rvtlã¤ã³ã¿ã¼ããªã¿ã¯ä¸è¦ã«ãªãã¾ãã 5) ã³ã³ãã¤ã©ã®ã½ã¼ã¹ãæ¹è¯ãã¦ã³ã³ãã¤ã« rvtlã³ã³ãã¤ã©ã ãã§rvtlã³ã³ãã¤ã©ã®æ¹è¯ãè¨èªèªèº«ã®æ¹è¯ãå¯è½ã§ãã
ããã°ã©ã è¨èªãä½æããã«ã¯ãã¤ã³ã¿ããªã¿ãã³ã³ãã¤ã«ãè¨è¿°ããããã®ããã°ã©ã è¨èªãå¿ è¦ã¨ãªãã¾ãããã¿ãã´ãå ãããã¯ããªãå ããã¨ããåé¡ã¨åãã§ããããã¯ããªã§ã¯ãªãé³¥ããã¯ããªã®ã¿ãã´ãç£ãã ããçãã¨ãªãã¾ãã
rvtlcã®åºåELFãã¤ããªã®ã¡ã¢ãªããã
rvtlcãåºåããããã°ã©ã (å®è¡å½¢å¼ã®ELFãã¡ã¤ã«)ã®å®è¡æã¡ã¢ãªãããã§ããgcc ã¨ã¯ç°ãªããMS-DOS ã®comå½¢å¼ã®ããã«åºå®ã¢ãã¬ã¹ã§åä½ãã¾ãã
: : +---------------------------------------+ 0x08048000 .text | ELF Headeré å | +---------------------------------------+ 0x08048080 | ã©ã³ã¿ã¤ã ã©ã¤ãã©ãªé å | +---------------------------------------+ | ã³ã¼ãé å æ大350KB | | | +---------------------------------------+ : : +=======================================+ 0x080A0000 .bss | ã©ã³ã¿ã¤ã ã©ã¤ãã©ãªä½æ¥é å 16KB | +---------------------------------------+ 0x080A4000 | å¤æ°é å 128ã¯ã¼ã 1KB | +---------------------------------------+ | å¤æ°ã¹ã¿ã㯠1024ã¯ã¼ã 4KB | +---------------------------------------+ & | ãã¼ãé å 256KB å®è¡æã«æ¡å¼µå¯è½ | : : | | +---------------------------------------+ * : : | ã¹ã¿ãã¯é å | +---------------------------------------+
å¤æ°ã®å²ä»
rvtlã¯å¤æ°ã¨ã㦠A-Zãa-z ã®52種é¡ã®ã¿ä½¿ç¨ã§ãã¾ããrvtlc.vtl ã§ã¯ A-Zãz ãã°ãã¼ãã«å¤æ°ã¨ãã¦ä½¿ããa-y ãå±æå¤æ°ã¨ãã¦ä½¿ã£ã¦ãã¾ãã
ã°ãã¼ãã«å¤æ°
rvtlã³ã³ãã¤ã©ã®å ¨ä½ãéãã¦ä½¿ãã°ãã¼ãã«å¤æ°ã®ä½¿ç¨æ¹æ³ã§ãã
A | æªä½¿ç¨ |
B | BSS .bss å é ã¢ãã¬ã¹ |
C | å ¥åã½ã¼ã¹æåé åãè¡é·ã¯Sã«ä¿æ |
D | ãããã°ã¬ãã« |
E | Libå ã®.texté åæ¸ãè¾¼ã¿ç¨ã¯ã¼ã¯ |
F | ã©ã¤ãã©ãªèªã¿è¾¼ã¿ã¨ãªã¢ |
G | ã©ã¤ãã©ãªãµã¤ãº |
H | ELFãã©ã¼ãããã¯ã¼ã¯(é å) |
I | ã»ã¯ã·ã§ã³ããããã¼ãã«ã®è¨å®ã§ä½¿ç¨(å±æå¤æ°ã§å¯) |
J | ã©ã³ã¿ã¤ã ã©ã¤ãã©ãªã®ã¸ã£ã³ããã¼ãã«ãªãã»ãã |
K | ã©ãã«:ã¢ãã¬ã¹ãã¼ãã«æçµç»é²ä½ç½®+1=ç»é²æ° ãä¿æ |
L | ã©ãã«:ã¢ãã¬ã¹ãã¼ãã« |
M | ã³ã¼ãé åå é |
N | Nã¯è¡å é ãã¤ã³ã¿ãæåã®è¡ã«è¨å® |
O | Obj[] ã³ã¼ãæ ¼ç´é å |
P | Objã®ã¤ã³ããã¯ã¹(byte) |
Q | PASS ã«ã¦ã³ã¿ |
R | PASSæ¯ã®ã³ã¼ããµã¤ãºãä¿æ |
S | Cããã®è¡é· |
T | Control Table (é å) |
U | Control Table Pointer |
V | è¡çªå·:ã¢ãã¬ã¹ãã¼ãã« |
W | è¡çªå·:ã¢ãã¬ã¹ãã¼ãã«æçµç»é²ä½ç½®+1=ç»é²æ° ãä¿æ |
X | åºåãã¡ã¤ã«å |
Y | ã½ã¼ã¹æ ¼ç´ç¨é å |
Z | ã³ã³ãã¤ã©å é è¡çªå·ãä¿å |
z | 確ä¿æ¸ã¿ã®ã¡ã¢ãªä¸éï¼1 |
ã°ãã¼ãã«å¤æ°(é åH)
ã°ãã¼ãã«å¤æ°ã®æ°ã足ããªãããé åHãã°ãã¼ãã«å¤æ°ã¨ãã¦ä½¿ãã¾ããèªã¿ãããã®ãããã¤ã³ããã¯ã¹ã¯æ°å¤ã§ã¯ãªãæåå®æ°ã使ã£ã¦ãã¾ããã¡ãã£ã¨ã¡ã¢ãªã®ç¡é§ã«ãªãã¾ãããèå¥ãããããªãã¾ãã
H['A']=$08048080 | e_entry |
H['B']=$08048000 | address .text |
H['C']=P | ã³ã¼ãçæå é ãªãã»ãã |
H['D']=q-Obj-P | .dataæåå |
H['E']=q-Obj-P | .bssæåå |
H['F'] | ã½ã¼ã¹ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ |
H['G'] | ã½ã¼ã¹èªã¿è¾¼ã¿ç¨ã¯ã¼ã¯ |
H['H']=q-Obj-P | .shstrtabæåå |
H['I'] | éå§æéè¨é²(ç§) |
H['J'] | éå§æéè¨é²(ãã¤ã¯ãç§) |
H['K']=$080A0000 | .data é åå é ã¢ãã¬ã¹ |
H['L']=0 | .data é åã®ãµã¤ãº(byte) |
H['M']=0 | .data ãªãã»ãã |
H['N']=H['K']+H['L'] | .bss é åå é ã¢ãã¬ã¹ |
H['O']=256*1024 | .bss é åã®ãµã¤ãº(byte) |
H['P']=H['A']-H['B'] | sect_offset=e_entry-p_paddr |
H['Q']=P | .data çµãã |
H['R'] | |
H['S']=P | .shstrtab |
H['T']=q-Obj-P | .textæåå |
H['U']=$4000 | .bssé åä¸ã®å¤æ°é åãªãã»ãã |
H['V']=H['N']+H['U'] | .bssé åä¸ã®å¤æ°é åå é ã¢ãã¬ã¹ |
H['W']=H['V']+$400 | .bssé åä¸ã®å¤æ°ã¹ã¿ãã¯å é ã¢ãã¬ã¹ |
H['X']=H['W']+$1000 | ãã¼ãé åå é ã¢ãã¬ã¹ |
H['Y']=P-H['S'] | .shstrtabã»ã¯ã·ã§ã³ãµã¤ãº |
H['Z']=P-H['P'] | .textã»ã¯ã·ã§ã³ãµã¤ãº |
é åç¨ã®ã¡ã¢ãªç¢ºä¿ã¨ã°ãã¼ãã«å¤æ°ã®åæè¨å®
rvtlcã®åæåé¨åã§ããå¤æ° z ã空ãã¡ã¢ãªé åã®å é ã«è¨å®ãã¦ãé åã®é åã確ä¿ããå ´åã¯ããX=z z=z+256ãã®ããã« z ãæ´æ°ãã¾ããããã§ãX(256)ãã«ç¸å½ããåä½ããã¾ãã
10000 :------------------------------------------------------------ 10010 : rvtlc.vtl - rvtl Compiler 10020 : 2006/03/20- Jun Mizutani 10030 : 2006/05/02,05/16 10040 : ã³ã³ãã¤ã«ããrvtlã½ã¼ã¹ããã¤ãã³ã®å¾ã«æå® 10050 : rvtl rvtlc.vtl - to_be_compiled.vtl 10060 : #=1 10070 : PASS1ã§ã³ã¼ãçæã¨ã©ãã«ãã¼ãã«ä½æ 10080 : PASS2ã§ã©ãã«ãã¼ãã«ãåç §ãã¦ã³ã¼ãçæããã¤ããªåºå 10090 :------------------------------------------------------------ 10100 Z=9999999 : #-100 : ã³ã³ãã¤ã©å é è¡çªå·ãä¿å 10110 D=0 : ãããã°ã¬ãã« 10120 z=& : ãã¼ãå é 10130 X=z z=z+256 X*="bin.elf" : åºåãã¡ã¤ã«å(å¾ã§å¤æ´) 10140 M== : ã³ã¼ãé åå é 10150 *=*+(512*1024) 10160 J=35 : ã¸ã£ã³ããã¼ãã«å é ã¤ã³ããã¯ã¹ 10170 : 10180 Obj=z z=z+(256*1024) : 256KB ã¾ã§ã®ãã¤ããªãã¡ã¤ã« 10190 H=z z=z+512 : for ELF Header 10200 T=z z=z+300 : control table (for,do) 10210 U=0 : control table pointer 10220 V=z z=z+64000 : 8000è¡åã®è¡çªå·:ã¢ãã¬ã¹ãã¼ãã« 10230 W=0 : è¡çªå·ãã¼ãã«æçµä½ç½®+1=ç»é²æ° 10240 L=z z=z+16000 : 1000ã®ã©ãã«:è¡çªå·ãã¼ãã« 10250 K=0 : ã©ãã«:è¡çªå·ãã¼ãã«æçµä½ç½®+1=ç»é²æ° 10260 Q=1 : PASSã«ã¦ã³ã¿ 10270 F=z z=z+8096 : ã©ã¤ãã©ãªèªã¿è¾¼ã¿é å 10280 R=z z=z+8 : ãã¹éã®ã³ã¼ããµã¤ãºç¢ºèª 10290 !=^TimerStart 10300 !=^InitSource : ã½ã¼ã¹ã³ã¼ãèªã¿è¾¼ã¿ 10310 :------------------- 10320 H['B']=$08048000 : ã³ã¼ãé åå é ã¢ãã¬ã¹ 10330 H['A']=$08048080 : e_entry 10340 H['K']=$080A0000 : .data é åå é ã¢ãã¬ã¹ 10350 H['L']=0 : .data é åã®ãµã¤ãº(byte) 10360 H['M']=0 : .data ãªãã»ãã 10370 H['N']=H['K']+H['L'] : .bss é åå é ã¢ãã¬ã¹ 10380 H['O']=256*1024 : ãã¼ãé åã®ãµã¤ãº(byte) 10390 H['U']=$4000 : .bssé åä¸ã®å¤æ°é åãªãã»ãã 10400 H['V']=H['N']+H['U'] : .bssé åä¸ã®å¤æ°é åå é ã¢ãã¬ã¹ 10410 H['W']=H['V']+$400 : .bssé åä¸ã®å¤æ°ã¹ã¿ãã¯å é ã¢ãã¬ã¹ 10420 H['X']=H['W']+$1000 : ãã¼ãé åå é ã¢ãã¬ã¹ 10430 !=^LibRead : 10440 !=^SetUpLib 10450 E=Obj+P 10460 H['C']=P : ã³ã¼ãçæå é ãªãã»ãã 10470 H['P']=H['A']-H['B'] : sect_offset=e_entry-p_paddr 10480 :
è¡çªå·10110ã®å¤æ° D ã®å¤ã大ããããã¨æ§æ解æã®çµéãã³ã³ãã¤ã«ã®çµæã®è©³ç´°ã表示ãããã¨ãã§ãã¾ããå¤ã大ãããªãã¨è¡¨ç¤ºå 容ã¯è¿½å ããã¦ããã¾ãã
D | 表示å 容 |
---|---|
0 | 表示ãªã |
1 | è¡çªå·ãã¼ãã«ã¨ã©ãã«ãã¼ãã«ã表示 |
2 | æ§æ解æã®çµéã表示 |
3 | ã½ã¼ã¹ä¸ã®æ°å¤ã表示 |
4 | ã©ã³ã¿ã¤ã ã©ã¤ãã©ãªã®å¼ã³åºãçªå·ã表示 |
5 | ã¢ãã¬ã¹ã¨åºåããæ©æ¢°èªã表示 |
æéè¨æ¸¬
ã³ã³ãã¤ã«æéãè¨æ¸¬ããé¨åãã³ã³ãã¤ã«åã«æå»ãåå¾ããã³ã³ãã¤ã«å¾ã®æå»ã¨ã®å·®ãæ±ãã¾ããæå»ã¯UNIXæéã¨ãã¤ã¯ãç§ã§è¿ããããããããå·®ãæ±ãã¦ãã¾ãã
30370 :---------------------------------- 30380 : æéè¨æ¸¬éå§ 30390 :---------------------------------- 30400 ^TimerStart 30410 H['I']=_ H['J']=% 30420 ] 30430 : 30440 :---------------------------------- 30450 : æéè¨æ¸¬çµäºãçµéæé表示 30460 :---------------------------------- 30470 ^TimerStop 30480 t=H['I'] u=H['J'] x=_ y=% 30490 d=x-t f=y-u 30500 ;=(f<0) d=d-1 f=f+1000000 30510 " time:" ?=d "." ?[6]=f "sec" / 30520 ] 30530 :
ã½ã¼ã¹ã³ã¼ãã®èªã¿è¾¼ã¿
ã³ãã³ãã©ã¤ã³å¼æ°ã§æ¸¡ãããã½ã¼ã¹ãã¡ã¤ã«ããªã¼ãã³ãã¦ãä¸æåã¥ã¤èªã¿è¾¼ã¿ã以ä¸ã®å½¢å¼ã§è¡ã¨ãã¦æ ¼ç´ãã¾ããè¡çªå·ã¯èªè¾¼ã¿æç¹ã§æ°å¤ã«å¤æããã¾ããrvtl ã¤ã³ã¿ããªã¿ãã¹ã¯ãªãããã¡ã¢ãªä¸ã«æ ¼ç´ããå½¢å¼ã¨åãã§ãã
4byte 4byte 1byte 0-3byte +-------------------+--------+--------------------+-----+-----------+ +---| 次è¡ã¸ã®ãªãã»ãã| è¡çªå· | è¡ã®å 容 | 0 | ã¢ã©ã¤ã³ç¨| | +-------------------+--------+--------------------+-----+-----------+ +-->| 次è¡ã¸ã®ãªãã»ãã| è¡çªå· | è¡ã®å 容 | 0 | ã¢ã©ã¤ã³ç¨| +-------------------+--------+--------------------+-----+-----------+ : : : : : : +-------------------+--------+--------------------+-----+-----------+ | -1 | | | | | +-------------------+--------+--------------------+-----+-----------+
30540 :------------------------------------------------- 30550 : ã½ã¼ã¹èªã¿è¾¼ã¿ 30560 :------------------------------------------------- 30570 ^InitSource 30580 : z=& 30590 Y=z z=z+(128*1024) : ã½ã¼ã¹ä¿åé å 30600 H['G']=z z=z+16 : work 30610 !=^LoadSource 30620 !=^MkFileName 30630 : !=^ListSource 30640 M=Y : 30650 ] 30660 : 30670 :------------------------------------------------- 30680 : åºåãã¡ã¤ã«åãXã«è¨å® 30690 :------------------------------------------------- 30700 ^MkFileName 30710 +bzinf 30720 b=z z=z+256 30730 [=0 b*=\0 30740 n=% 30750 i=n 30760 @ 30770 i=i-1 30780 @=((b(i)='.')|(i=0)) 30790 ;=i=0 f=b+n f*=".elf" X*=b ] 30800 f=b+i f*=".elf" X*=b 30810 -fnizb 30820 ] 30830 : 30840 :------------------------------------------------- 30850 : ã½ã¼ã¹ãã¡ã¤ã«ãèªã¿è¾¼ã¿ 30860 :------------------------------------------------- 30870 ^LoadSource 30880 +ynml 30890 !=^SourceOpen : ã½ã¼ã¹ãã¡ã¤ã«ããªã¼ãã³ 30900 y=Y 30910 l=0 30920 @ 30930 : 1è¡èªã¿è¾¼ã¿ 30940 !=^SourceRead 30950 ;=c=' ' !=^SkipSpace 30960 ;=(c<'0')|(c>'9') !=^SkipLine #=^ls0 30970 !=^GetLineNo : è¡çªå· 30980 y[1]=n 30990 m=8 31000 @ 31010 y(m)=c : ã½ã¼ã¹ãLFã¾ã§ä¿å 31020 m=m+1 31030 !=^SourceRead 31040 ;=c=$0D !=^SourceRead 31050 @=((c=$0A)|(c=0)) 31060 y(m)=0 m=m+1 31070 m=(m+3)/4*4 : 4ã§ã¢ã©ã¤ã³ 31080 y[0]=m : 次è¡ã¾ã§ã®ãªãã»ãããè¨å® 31090 y=y+m 31100 l=l+1 31110 ^ls0 31120 @=(c=0) 31130 y[0]=-1 31140 !=^SourceClose : ã½ã¼ã¹ãã¡ã¤ã«ãã¯ãã¼ãº 31150 / "read " ?=l " lines" / 31160 -lmny 31170 ] 31180 : 31190 :------------------------------------------------- 31200 : 1è¡èªã¿é£ã°ã 31210 ^SkipLine 31220 @ 31230 !=^SourceRead 31240 @=((c=$0A)|(c=0)) 31250 ] 31260 : 31270 :------------------------------------------------- 31280 : ã½ã¼ã¹è¡¨ç¤º 31290 :------------------------------------------------- 31300 ^ListSource 31310 y=Y 31320 n=0 31330 @ 31340 ?(6)=y[1] 31350 $*=y+8 / 31360 y=y+y[0] 31370 @=(y[0]=-1) 31380 ] 31390 : 31400 :------------------------------------------------- 31410 : 空ç½é¤å» 31420 :------------------------------------------------- 31430 ^SkipSpace 31440 @ 31450 !=^SourceRead 31460 ;=(c>='0')&(c<='9') n=n*10+(c-'0') 31470 @=((c<>' ')) 31480 ] 31490 : 31500 :------------------------------------------------- 31510 : è¡çªå·åå¾ cã«1æåç® 31520 :------------------------------------------------- 31530 ^GetLineNo 31540 n=c-'0' 31550 @ 31560 !=^SourceRead 31570 ;=(c>='0')&(c<='9') n=n*10+(c-'0') 31580 @=((c<'0')|(c>'9')) 31590 ] 31600 :
rvtlã®åºæ¬æ©è½ã§ã¯ãã¡ã¤ã«ããã¹ã¦ã¡ã¢ãªã«èªã¿è¾¼ããã¨ã¯ã§ãã¾ãããããã¡ã¤ã«ããªã¼ãã³ãã¦ããã¡ã¤ã«ãã1æåãã¤èªã¿è¾¼ã¿ããã¡ã¤ã«ãã¯ãã¼ãºãããæ©è½ã¯ããã¾ãããã½ã¼ã¹ãã¡ã¤ã«ãã1æåãã¤èªã¿è¾¼ããããçµã¿è¾¼ã¿ã³ãã³ã|zz ã使ã£ã¦ã«ã¼ãã«ã®ã·ã¹ãã ã³ã¼ã«ã§ããã¡ã¤ã«ãªã¼ãã³ããã¡ã¤ã«ãªã¼ãããã¡ã¤ã«ã¯ãã¼ãºãå®ç¾ãã¦ãã¾ãã
31610 :------------------------------------------------- 31620 : ã½ã¼ã¹ãã¡ã¤ã«ããªã¼ãã³ 31630 :------------------------------------------------- 31640 ^SourceOpen 31650 +r 31660 b=\0 31670 !=^fropen 31680 H['F']=r 31690 -r 31700 ] 31710 : 31720 :------------------------------------------------- 31730 : ã½ã¼ã¹ãã¡ã¤ã«ãã¯ãã¼ãº 31740 :------------------------------------------------- 31750 ^SourceClose 31760 b=H['F'] 31770 !=^fclose 31780 ] 31790 : 31800 :------------------------------------------------- 31810 : ã½ã¼ã¹ãã1æåèªã¿è¾¼ã¿ 31820 :------------------------------------------------- 31830 ^SourceRead 31840 a=3 : read 31850 b=H['F'] : fd 31860 c=H['G'] : buffer 31870 d=1 : size 31880 |zz 31890 c=c(0) 31900 ;=(|<=0) c=0 31910 ] 31920 : 31930 :------------------------------------------------- 31940 : ãã¡ã¤ã«ããªã¼ãã³ 31950 : enter b : 第ï¼å¼æ° filename 31960 : return r : fd, if error then eax will be negative. 31970 :------------------------------------------------- 31980 ^fropen 31990 c=0 : 第ï¼å¼æ° flag=O_RDONLY 32000 #=^fopen 32010 ^fwopen 32020 c=577 : O_CREAT|O_WRONLY|O_TRUNC 32030 ^fopen 32040 a=5 : ã·ã¹ãã ã³ã¼ã«çªå· SYS_open 32050 d=420 : 第ï¼å¼æ° mode=0644 32060 |zz 32070 r=| 32080 ] 32090 :------------------------------------------------- 32100 : ãã¡ã¤ã«ãã¯ãã¼ãº 32110 : enter b : 第ï¼å¼æ° ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ 32120 :------------------------------------------------- 32130 ^fclose 32140 a=6 : ã·ã¹ãã ã³ã¼ã«çªå· SYS_close 32150 |zz 32160 r=| 32170 ] 32180 :
[ç®æ¬¡] [次]