弟はITの勉強を手伝ってくれと言うから、特に関心を持たず弄ってみたけど、流石にそれだけ有名のあるプロセッサーだね。Z80のアセンブラはちょうど現在によく使われているMCU(マイクロコントローラーユニット)と今のコンピューターの間のアセンブラを利用しているので、教育に良いと言われる理由が良く解った。
プロラッミングしてみたら、やはり面白いと思ってしまった。結構基本的なアセンブラなんだけど、とりあえず常識としてしっかり学んでおくようにしたい。その価値があると判断した。そういう訳なんだけど、もしかしたらもう一つのブログでいくつか練習のために書いてみた例のようなプログラムをポストするかもしれない。
ちなみに、知りたい人がいらっしゃると、とても便利な開発ソフトを見つけたよ。ジェノヴァ大学の先生が作って下さったらしい。エディタはエミュレータ丸ごとと一緒になっていて、もの凄く楽。ホームページもソフトも英語だし、実際にアイコンがとても解りやすくて、英語をあまり馴染まなくても大丈夫というぐらいの使い勝手。良かったら試してみたい人はここからダウンロードしてみてね: http://www.esng.dibe.unige.it/deeds/Index.htm
誰も怖がらせたくないけど、一応今日書いたパラレルで入力した6ビットのデータをシリアルで出力するプログラムをここに添付する。勿論最初の例としてかなり難しいけど、既に他のアセンブラをお使いになった方には具体的にZ80のアセンブラがどんな感じかを解ってもらえるには最適と思う。まだ経験のない人には、これぐらいのレベルに着くまで多分1週間から1ヶ月まで掛かれるとかもしれない。では、早速だけど:
;Parallel-Serial 6 bit
;This program gets a parallel INPUT on port 12h
;Bit 0 is the TRIGGER, if it changes from 0 to 1
;data is sent serially on bit 0 of the OUTPUT port 14h.
;Data is composed of 6 bits from bit 1 to 6 of INPUT.
;Bit 7 is supposed to be always in low state.
;Once a sequence is sent, program waits for next one.
INPUT EQU 12H ;Input port address
OUTPUT EQU 14H ;Output port address
ORG 0000H ;Z80 starts here on reset
JP START ;skips memory reserved to interrupts
ORG 0100H ;our program will start from address 100h
START: LD SP, 0FFFFH ;inizializes the stack pointer
LD B, 00H ;I will use register B to fast clear register A
WAIT_0: IN A, (INPUT) ;get INPUT
BIT 0, A ;when bit 0 goes from low to high we are ready
JP NZ, WAIT_0 ;to send data serially on bit 0 of the OUTPUT port
WAIT_1: IN A, (INPUT)
BIT 0, A
JP Z, WAIT_1
LD C, A ;saves the INPUT in register C
LD D, 08H ;register D will count the number of sent bits
NEXT: RR C ;rotates C right. Bit 0 will be moved to the Carry flag
LD A, B ;resets A
RLA ;RLA gets the Carry flag an pushes it in bit 0 of A register
OUT (OUTPUT), A ;updates OUTPUT
CALL WAIT_1MS ;waits 1ms (WAIT_1MS is a function)
DEC D ;count the sent bit
JP NZ, NEXT ;if there are still bits to be sent, keeps sending
JP WAIT_0 ;otherwise jumps to start waiting for next sequence.
WAIT_1MS:LD A, 238D ;we will do 238 cycles to pause 1ms
LOOP: DEC A ;that is because the system is supposed to work with a 10MHz clock
NOP ;and instructions inside the loop use 42 clock cycles.
NOP ;respectively DEC = 4, NOP = 4, JP = 10
NOP ;thus for a total of about 10,000 cycles.
NOP
NOP
NOP
NOP
JP NZ, LOOP
RET ;goes back to main program
最後に忘れて欲しくないこと:今SDCCはZ80のアセンブラも書けるので、アセンブラの使いたくない人はCを使ってこのオープンソースコンパイラを使用してプログラミンング出来るよ。質問があれば、どうぞコメントはいつも大歓迎。それでは、また今度!
Wednesday, April 23, 2014
Wednesday, March 26, 2014
マッシュルーム (Mushroom) - H&MC (High and Mighty Color)
昨日H&MC (High and Mighty Color)のまだ聴いていなかったシングルを調べてみたら、初めてDanceを鑑賞して、その中に「マッシュルーム」(Mushroom)がスゴく気に入った!わけの解らない歌なんだけど、楽しい!何度も聴いてしまう。
Disclaimer: - No Copyright Infringement Intended - I do not own the sound track used in this video. No profit will be made whatsoever. All rights to the sound track belongs to its respectful owners. This video is used for entertainment purposes only.
Disclaimer: - No Copyright Infringement Intended - I do not own the sound track used in this video. No profit will be made whatsoever. All rights to the sound track belongs to its respectful owners. This video is used for entertainment purposes only.
マックでのアクセントの書き方
スゴいニュースがあるよ。
ネット上でよく知られていることだと思うが、今日本のマックのキーボードでもちゃんとイタリア語の使うアクセントを書けると偶然で解った。やり方もものすごく簡単。
Option Key + _ そして続いて a / i / u / e /o key を押すと、 à / ì / ù / è / ò
Option Key + e そして続いて a / i / u / e /o key を押すと、 á / í / ú / é / ó
_ keyは日本のキーボードで平仮名の「ろ」 が書いてあるキーのこと。
やり方が解った? またイタリア語や外国語の書く時に使ってみてね!
ネット上でよく知られていることだと思うが、今日本のマックのキーボードでもちゃんとイタリア語の使うアクセントを書けると偶然で解った。やり方もものすごく簡単。
Option Key + _ そして続いて a / i / u / e /o key を押すと、 à / ì / ù / è / ò
Option Key + e そして続いて a / i / u / e /o key を押すと、 á / í / ú / é / ó
_ keyは日本のキーボードで平仮名の「ろ」
やり方が解った? またイタリア語や外国語の書く時に使ってみてね!
Thursday, March 6, 2014
Come si puo` dare una svolta alla propria vita?
Forse e` bene ricordarsi che “Le persone di successo hanno l’abitudine di fare ciò che le persone comuni non amano fare.”! (A.Grey)
Per me tuttavia questa e` una frase per dare un senso alla mia vita, ... in effetti ho sempre continuato a fare quello che la maggior parte delle persone che mi circondavano non amavano fare! (fosse questo leggere, studiare, programmare, parlare in altre lingue, ecc.)
Per me tuttavia questa e` una frase per dare un senso alla mia vita, ... in effetti ho sempre continuato a fare quello che la maggior parte delle persone che mi circondavano non amavano fare! (fosse questo leggere, studiare, programmare, parlare in altre lingue, ecc.)
Cooperate to the Open Japanese-English Dictionary! オープン日英辞典に協力しましょう! WWWJDIC & JMdic
Have you ever felt your dictionary should contain more expressions or lacks of words?? The open JMDict project managed by Jim Breen and few other brave official editors is completely free and contains more than 173,000 entries as of now. But the best it is You can contribute and add your own (each entry submission is carefully revised)!
I have been using the WWWJDIC for very long time, and I love the many related software that generated from it, as the Zkanji project that I use on an every day basis. Sometimes I have to spend a considerable amount of time in deciphering the complete meaning of a word, and it is quite fulfilling to know my efforts were not only for me, but also helped the people to come! Moreover, updating the dictionary also aid my review, as I can also have the new vocabulary in my flash card program (Zkanji) after some time (few months).
皆さん、一緒にJMDictを磨いていきましょう!
http://www.edrdg.org/jmdictdb/cgi-bin/edform.py?svc=jmdict&sid=
Just today during my studies I dropped the following submissions (still pending):
I have been using the WWWJDIC for very long time, and I love the many related software that generated from it, as the Zkanji project that I use on an every day basis. Sometimes I have to spend a considerable amount of time in deciphering the complete meaning of a word, and it is quite fulfilling to know my efforts were not only for me, but also helped the people to come! Moreover, updating the dictionary also aid my review, as I can also have the new vocabulary in my flash card program (Zkanji) after some time (few months).
皆さん、一緒にJMDictを磨いていきましょう!
http://www.edrdg.org/jmdictdb/cgi-bin/edform.py?svc=jmdict&sid=
Just today during my studies I dropped the following submissions (still pending):
- 食欲をそそる
- 逢い引き
- 面積
- ご自愛ください
- 感謝感激
- 感謝感激雨霰
- 汚職撲滅
- 今までで;これまでで
- 最大規模
- 大声で叫ぶ
- 宇治茶
- 静岡茶
- 日本三大茶
- 三大茶
- 三大銘茶
- 二大
- 日本二大茶
Thursday, February 20, 2014
The Dilemma of Kindness
Actually I meant to write in Italian, but well anyway, screw it! ...
I've just finished reading Banana Yoshimoto's "Asleep" (白川夜舟) and I have to say I found it quite inspiring. Before this I gave a glimpse to her essay "Jinsei no tabi wo yuku" (人生の旅をゆく - Going through the Path of Life -) and I found it somewhat dry, even though it had some very interesting insights on how Japanese people perceive foreigners, Italy in particular. However, now that I read "Asleep", I can say Yoshimoto really knows how to bring you in her world, while whispering you the truths of life and maybe more. The way she describes places, dreams, and people feelings is just so real, you see a vivid image of it: you grow closer and closer to the personae as the pages turn themselves one after another.
And so, when I finished reading the last of the three short stories inside the book, "An experience", suddenly a question prompted out of my mind:
What does it means to truly care about people? And how can we change our way to do so, without lying to ourselves and/or them?
Somewhat I felt that it is the whole point of it. Something I was circling around over and over, avoiding to face it directly. Yes, I want to be more direct in the way I interact with people, but if I do so, wouldn't I happen by any chance to stop truly caring about them? I kept so long avoiding hurting people, that I might have forgotten how to care for them while showing how different is my way of thinking compared to theirs.
As much scaring this could be, I'll have to take action... and get hold of this weak spot to finally get my heart free of the oppressing feelings currently withholding it.
I've just finished reading Banana Yoshimoto's "Asleep" (白川夜舟) and I have to say I found it quite inspiring. Before this I gave a glimpse to her essay "Jinsei no tabi wo yuku" (人生の旅をゆく - Going through the Path of Life -) and I found it somewhat dry, even though it had some very interesting insights on how Japanese people perceive foreigners, Italy in particular. However, now that I read "Asleep", I can say Yoshimoto really knows how to bring you in her world, while whispering you the truths of life and maybe more. The way she describes places, dreams, and people feelings is just so real, you see a vivid image of it: you grow closer and closer to the personae as the pages turn themselves one after another.
And so, when I finished reading the last of the three short stories inside the book, "An experience", suddenly a question prompted out of my mind:
What does it means to truly care about people? And how can we change our way to do so, without lying to ourselves and/or them?
Somewhat I felt that it is the whole point of it. Something I was circling around over and over, avoiding to face it directly. Yes, I want to be more direct in the way I interact with people, but if I do so, wouldn't I happen by any chance to stop truly caring about them? I kept so long avoiding hurting people, that I might have forgotten how to care for them while showing how different is my way of thinking compared to theirs.
As much scaring this could be, I'll have to take action... and get hold of this weak spot to finally get my heart free of the oppressing feelings currently withholding it.
Saturday, January 18, 2014
Copy - The new frontier of Clouding! and why it wins over Dropbox and Google Drive
I have been trying many cloud storage services, but most of them made me unsatisfied, with Copy Sync, for the first time after long I was pleasurably satisfied.
Let me tell you why. Well, first you might try it yourself the special 20GB of storage campaign: if you use an invitation link to register you get 5 extra GB together with the one inviting you (instead of 15GB)!! I drop here mine so you can use it to register later if you like.
https://copy.com?r=IwvAB6
The second part of my stratification in fact lies in what other clouding software left me unsatisfied with.
Feel free to ask any question regarding the various differences in the cloud storage services and I'll be more then happy to reply you!! Just drop a comment!
https://copy.com?r=IwvAB6 <- to register ;)
Let me tell you why. Well, first you might try it yourself the special 20GB of storage campaign: if you use an invitation link to register you get 5 extra GB together with the one inviting you (instead of 15GB)!! I drop here mine so you can use it to register later if you like.
https://copy.com?r=IwvAB6
The second part of my stratification in fact lies in what other clouding software left me unsatisfied with.
- First, Dropbox does Delta Syncing and it's really cool even to use together Truecrypt Volumes. But free storage is just not enough: 2GB end in the blink of an eye.
- Most of cloud services out there, including Google Drive (as of 2014/01), fail in meeting on one very basic requirement: differential syncing. That is delta sync, the capacity to actually re-upload only the single part of a file that changed without re-transfering the whole thing wasting bandwidth.. Crucial when often changing bits of huge files as I do.
- Copy sync has 20GB of storage (if you use the link above to register), delta syncing with real-time syncronization (based on timestamps so be aware of properly setting your Truecrypt Volume in case you plan to use them together) and clients for ALL platforms, including Linux, Mac OS, Windows, Android, iOS, Windows Phones and more to come!
- The Web-interface is just good-looking and intuitive, I like it. A true eye-candy ;)
Feel free to ask any question regarding the various differences in the cloud storage services and I'll be more then happy to reply you!! Just drop a comment!
https://copy.com?r=IwvAB6 <- to register ;)
Subscribe to:
Posts (Atom)


