Tags:

คุณ Fabrice Bellard ได้ทดลองสร้าง PC emulator ขึ้นมาโดยใช้ JavaScript ล้วนๆ (ต้องรองรับ W3C Typed Arrays) โดยสามารถจำลองการทำงานได้ใกล้เคียงกับ 486 ที่ไม่มี FPU แต่ว่ามี MMU ที่สมบูรณ์เพื่อจะเล่น Linux ได้

บรรยายไปก็ไม่เท่าเห็นของจริง ไปลองเล่นกันเลยดีกว่า (ใช้ได้กับ Firefox 4 และ Chrome 11)

เค้าเตรียมไฟล์ hello.c และโปรแกรม tcc สำหรับคอมไฟล์โปรแกรมไว้ด้วย พร้อมกับโปรแกรม vi และ qemacs สำหรับใช้แก้ไขไฟล์

น่าลองเอามาใช้ประกอบเว็บสอน Linux เบื้องต้น หรือหัดเขียนโปรแกรมจริงๆ

ที่มา: Javascript PC Emulator - Technical Notes

Comments

By: EThaiZone
ContributorSymbian
EThaiZone's blog
on 20/05/11 17:12 #291177 toggle
EThaiZone's picture

ใช้ ls ได้ด้วย O_o

By: dafty
iPhoneUbuntuWindowsIn Love
dafty's blog
on 20/05/11 17:26 #291181 toggle
dafty's picture

เทพ+

By: nowingnoid
iPhoneAndroidUbuntu
nowingnoid's blog
on 20/05/11 17:30 #291182 toggle
nowingnoid's picture

เทพพพพพ


The world wants entertainment, but the world needs enlightenment! To be or not to be!? Hero or Zero!? Those are questions.

---

Living life with freedom in mind, in every limitation, that is the true freedom.

By: 9neo
9neo's blog
on 20/05/11 17:33 #291185 toggle
9neo's picture

เทพพพพพพพ!!!! โคตรๆ

By: TRoy888
AndroidUbuntu
TRoy888's blog
on 20/05/11 17:34 #291186 toggle
TRoy888's picture

เทพมาก

By: soginal
Android
soginal's blog
on 20/05/11 17:50 #291194 toggle
soginal's picture

มี vi ด้วย - -!


  1. "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
  2. "Life like binary tree"
  3. "I need emoticon"
By: kswisit
AndroidIn Love
kswisit's blog
on 20/05/11 18:14 #291202 toggle
kswisit's picture

rm -rf ได้ไหม

By: hereblur
hereblur's blog
on 20/05/11 18:43 #291209 Reply to:291202 toggle
hereblur's picture

พังครับ ต้อง refresh (boot) ใหม่ -.-'

By: cloverink
iPhoneAndroidUbuntu
cloverink's blog
on 20/05/11 18:21 #291204 toggle
cloverink's picture

อ๊ากกกกกกก


i = NulL

By: PiKO
ContributorAndroid
PiKO's blog
on 20/05/11 18:21 #291206 toggle
PiKO's picture

โคตรเทห์อ่ะ ลง Win95 ได้มั้ย :D


:: DigiKin8 ::

By: mekpro
ContributorAndroidUbuntu
mekpro's blog
on 20/05/11 18:57 #291217 toggle
mekpro's picture
  • มี environment $PATH
  • รัน top ได้ด้วยนะ
  • คอมไพล์โปรแกรมได้ใช้ tcc hello.out
By: mekpro
ContributorAndroidUbuntu
mekpro's blog
on 20/05/11 19:48 #291218 toggle
mekpro's picture
  • ซ้ำจ้า *
By: nowingnoid
iPhoneAndroidUbuntu
nowingnoid's blog
on 20/05/11 18:57 #291219 toggle
nowingnoid's picture

เอามาลง พวก Linux จิ๋ว หรือ kolibri OS ได้ไหมนะ

แล้วก็ให้รันเป็น Cloud OS


The world wants entertainment, but the world needs enlightenment! To be or not to be!? Hero or Zero!? Those are questions.

---

Living life with freedom in mind, in every limitation, that is the true freedom.

By: ipats
ContributorWindows PhoneAndroidExteen Official
ipats's blog
on 20/05/11 19:03 #291223 toggle
ipats's picture

google ซื้อ เอาไปจับยัด Chrome OS โอ้ว เย ฮ่าๆ


iPAtS

By: totiz
ContributoriPhoneAndroid
totiz's blog
on 22/05/11 10:59 #291224 toggle
totiz's picture

บน Chrome 12.0.742.60 beta ติดอยู่บรรทัด Freeing unused kernel memory: 124k freed แต่ถ้า firefox ไม่มีปัญหา

~ # df -h
Filesystem                Size      Used Available Use% Mounted on 
/dev/root                 2.0M      1.4M    442.0K  77% /
tmpfs                    14.8M         0     14.8M   0% /tmp

ใช้พื้นที่แค่ 1.4M เอง

ปล. โครตเทพ
By: iStyle
ContributorAndroidSymbianWindows
iStyle's blog
on 20/05/11 19:48 #291248 toggle
iStyle's picture

เห้ย!


May the Force Close be with you.

By: atheist
AndroidUbuntuWindows
atheist's blog
on 20/05/11 20:23 #291262 toggle
atheist's picture

Midori 0.3.6 ก็ใช้ได้

By: username
username's blog
on 20/05/11 20:52 #291268 toggle
username's picture

เอางั้นเลยเรอะ

By: PaPaSEK
ContributorAndroidWindowsIn Love
PaPaSEK's blog
on 20/05/11 21:15 #291272 toggle
PaPaSEK's picture

บอกตรงๆ ว่า "งงเลย"

By: boonkhao
ContributoriPhoneBlackberryUbuntu
boonkhao's blog
on 20/05/11 21:55 #291278 toggle
boonkhao's picture

เปิดบน iPhone ก็เห็นมีเคอร์เซอร์กระพริบขึ้นมานะ แต่พิมพ์อะไรไม่ได้เพราะมันไม่แสดงคีบอร์ด ถ้าสนับสนุนจอสัมผัสก็น่าจะใช้งานได้นะ

By: Chad
iPhone
Chad's blog
on 20/05/11 21:55 #291281 toggle
Chad's picture

เมพขิงๆ

By: lancaster
ContributoriPhoneAndroidWindows
lancaster's blog
on 20/05/11 22:16 #291286 toggle
lancaster's picture

เฮ้ย!! ไปขนาดนี้แล้วเรอะ

By: tanit9999
Android
tanit9999's blog
on 20/05/11 23:08 #291302 toggle
tanit9999's picture

คือถ้ามันเป็น javascript ล้วนๆแล้วทำไมผมจึง save แล้วรันที่เครื่องผมไม่ได้หละครับ หรือมันแค่ putty ที่รันผ่านหน้าเว็ป - -?

By: lancaster
ContributoriPhoneAndroidWindows
lancaster's blog
on 20/05/11 23:32 #291312 Reply to:291302 toggle
lancaster's picture

ถ้ากด save จาก browser มันจะแปลง output ของ javascript เป็น html ให้ครับ ทำให้มันไม่สมบูรณ์ว่างั้นเถอะ

By: tanit9999
Android
tanit9999's blog
on 21/05/11 18:17 #291532 Reply to:291312 toggle
tanit9999's picture

เปล่าครับผมก็ดูดไฟล์มาทั้งหมดครับ = =!! ไม่ได้ทำดิบๆแบบนั้นครับ

ปล. แอบโกรธนะเนี้ย

By: lancaster
ContributoriPhoneAndroidWindows
lancaster's blog
on 21/05/11 20:03 #291552 Reply to:291532 toggle
lancaster's picture

แสดงว่าไม่ได้ดึง os image มาด้วย?

By: kswisit
AndroidIn Love
kswisit's blog
on 20/05/11 23:37 #291315 Reply to:291302 toggle
kswisit's picture

เข้าใจว่า term.js เป็น terminal

ส่วน cpux86.js เป็นตัว emu เฉยๆ

ที่ขาดคือ os มันเลยไม่บูต XD

By: anu
ContributorWindows Phone
anu's blog
on 20/05/11 23:42 #291316 Reply to:291302 toggle
anu's picture
  • http://bellard.org/jslinux/ (HTML)
  • http://bellard.org/jslinux/cpux86.js
  • http://bellard.org/jslinux/term.js
  • http://bellard.org/jslinux/vmlinux26.bin
  • http://bellard.org/jslinux/root.bin
  • http://bellard.org/jslinux/linuxstart.bin

สำหรับ JavaScript ลองเอาไปใส่ http://jsbeautifier.org/ ละดูโค้ดครับ

By: tanit9999
Android
tanit9999's blog
on 21/05/11 18:11 #291531 Reply to:291316 toggle
tanit9999's picture

ไอไฟล์ .bin มัน javascript ด้วยหรือครับ = =?? ไหนว่า javascript ล้วนๆไง ตอนแรกผมอ่านเข้าใจว่า สร้างทั้ง ระบบ ด้วย javascript พอดีผมไม่เข้าใจถ้าสะดวกช่วยแนะนำด้วยครับ

By: ipats
ContributorWindows PhoneAndroidExteen Official
ipats's blog
on 21/05/11 18:45 #291537 Reply to:291531 toggle
ipats's picture

ถูกแล้วครับ Emulator ทั้งระบบ ใข้ javascript ครับ, ส่วน .bin นั้นคือส่วนของ OS ที่เอามารันบน Emulator อีกที ซึ่งในที่นี้คือ linux ครับ


iPAtS

By: lancaster
ContributoriPhoneAndroidWindows
lancaster's blog
on 21/05/11 20:01 #291551 Reply to:291531 toggle
lancaster's picture

สร้าง PC emulator ขึ้นมาโดยใช้ JavaScript ล้วนๆ

ปกติ OS ก็ไม่ได้เป็นส่วนประกอบของ emulator อยู่แล้วนะครับ

By: EThaiZone
ContributorSymbian
EThaiZone's blog
on 21/05/11 21:21 #291565 Reply to:291531 toggle
EThaiZone's picture

ที่เขาจำรองคือจำลองคอมพิวเตอร์ครับ เขาไม่ได้จำลอง OS คิดซะว่าคล้าย virtual machine ตัวหนึ่งล่ะกัน เหมือนพวก vbox vmware

By: AK
iPhoneAndroid
AK's blog
on 20/05/11 23:28 #291311 toggle
AK's picture

สุดยอดเลย

By: semicolonth
ContributoriPhoneRed HatSymbian
semicolonth's blog
on 20/05/11 23:32 #291313 toggle
semicolonth's picture

เทพโคตร


semicolon.in.th

By: spicydog
ContributorAndroidUbuntuWindows
spicydog's blog
on 20/05/11 23:39 #291317 toggle
By: criminals
iPhoneWindows PhoneAndroidUbuntu
criminals's blog
on 21/05/11 0:03 #291322 toggle
criminals's picture

แม่เจ้า อะไรจะขนาดนั้น!


Android จ๋า~*

By: lexurous
lexurous's blog
on 21/05/11 0:13 #291326 toggle
lexurous's picture

ต่อไปก็จำลองเป็นรุ่นเพนเทียมแล้วเอาดอสมาลง windows 3.11 95 98 me .... xp 7

By: iStyle
ContributorAndroidSymbianWindows
iStyle's blog
on 21/05/11 9:29 #291388 Reply to:291326 toggle
iStyle's picture

ข้าม vista นะเนี่ย :P


May the Force Close be with you.

By: deaw
deaw's blog
on 21/05/11 0:15 #291327 toggle
deaw's picture

Fabrice Bellard เค้าเทพอยู่แล้วครับ ไปอ่านประวัติเอาเถอะ http://en.wikipedia.org/wiki/Fabrice_Bellard

By: v6hp
Android
v6hp's blog
on 21/05/11 1:34 #291345 toggle
v6hp's picture

เล่นบน android ได้ด้วยแฮะ

By: criminals
iPhoneWindows PhoneAndroidUbuntu
criminals's blog
on 21/05/11 17:31 #291522 Reply to:291345 toggle
criminals's picture

เอ้อ จริงด้วยครับ!


Android จ๋า~*

By: HMage
Android
HMage's blog
on 21/05/11 2:04 #291349 toggle
HMage's picture

ลองดูงานอื่นของเค้ารู้สึกจะสนใจการหาค่า PI มากๆ เลยนะ


Hello blognone.

By: winggundamth
ContributorAndroidUbuntuIn Love
winggundamth's blog
on 21/05/11 3:19 #291351 toggle
winggundamth's picture

สุดยอดเกินไปแล้วววววว


I will change the world, to the better day.

By: Balll
iPhoneRed Hat
Balll's blog
on 21/05/11 7:21 #291363 toggle
Balll's picture

เจ๋งมากครับ เหมาะกับการเอาไปสอน basic linux สุดๆ

ปล. Safari 5.0.5 ใช้ได้แล้วนะครับ

By: krittikorn
iPhoneWindows PhoneAndroidBlackberry
krittikorn's blog
on 21/05/11 9:04 #291380 toggle
krittikorn's picture

ต่อไป ติดตั้ง libreOffice ได้ไหมนี่

Cool..5000

By: BreMen
iPhoneWindows PhoneAndroidIn Love
BreMen's blog
on 21/05/11 12:39 #291453 toggle
BreMen's picture

ขนาดผมเป็น User ทั่วไป ยังอึ้งเลยครับ +_+!


ถึงจะยากเพียงใด ก็ต้องผ่านไปให้ได้

By: iahcapus
AndroidWindows
iahcapus's blog
on 21/05/11 13:58 #291467 toggle
iahcapus's picture

telnet ได้ด้วย o___O" แต่จะ telnet ไปไหนหว่า -_-'

By: cavaji
AndroidUbuntu
cavaji's blog
on 21/05/11 16:47 #291516 toggle
cavaji's picture

ลองแล้ว ...สุดยอดไปเลย

By: none
WindowsIn Love
none's blog
on 21/05/11 19:56 #291548 toggle
none's picture

ใช้เวลาทำนานแค่ไหนเนี่ย ?


ทำไม....ต้องเป็น

By: HyBRiD
iPhoneSymbianUbuntuWindows
HyBRiD's blog
on 22/05/11 1:11 #291594 toggle
HyBRiD's picture

คนทำ QEMU นั่นเอง เมพขริงๆ


hybridplex

By: joomla
iPhoneUbuntu
joomla's blog
on 27/05/11 9:11 #293385 toggle
joomla's picture

อ่านข่าวมาได้ครึ่งหนึ่งแล้วทดลองไปเล่น ก็เจ่งดีแต่สงสัยว่าจะเอาไว้ใช้ทำอะไร พอกลับมาอ่านข่าวถึงบรรทัดสุดท้าย เออจริง


v___v