Profilo di Scorpion云起风扬FotoBlogElenchi Strumenti Guida

Blog


05 maggio

华丽的Portfolio……放出来吓人哈哈

YEDU0006 Learning through movies and mass media

Learning Portfolio

Table of contents

 Part 1  Definitions and descriptions

Definition and description of stereotype

Definition and description of mass media 

Part 2  A movie review about “Mr. Bean: The Library 

Part 3  My impressions on librarians 

Part 4  The Islamic stereotype, and analysis 

Bibliography and references 

 -------------------------------------------------------

Part 1 Definitions and descriptions

 

Definition and description of stereotype  

According to the encyclopedia, originally, a stereotype was “an impression taken from a form of movable lead type and used for printing instead of the original type”.

 

With time going on, however, the term was gradually generalized into a metaphor for identically repeating a set of ideas with little or no change. 

 

Nowadays, the definition becomes more flexible. Here I will use the definition from class notes, as I consider it very brief and precise: “A preconceived & oversimplified idea of the characteristics which typify a person, situation, etc; an attitude based on such a preconception. Also, a person who appears to conform closely to the idea of a type”. In plain language, a stereotype is a biased opinion, that an individual will take the behavior of one person and state that all people belonging to that particular group, be it an ethnic, religious or social group, behave in the same manner.

 

From the definition, we know that a stereotype is generally a neutral thing, it can be positive or negative, (actually, it is often used in a negative or prejudicial sense), can act as individual beliefs or collective belief systems. Moreover, often based on one’s own experiences or some perception gained from the mass media, stereotype is closely culture and society related. Lastly, stereotypes may express sometimes-accurate folk wisdom about social reality.

 

Definition and description of mass media

 

As we know, media is the plural form of medium. Considering the word medium, it means “an agency by which something is accomplished, conveyed, or transferred” as in the dictionary. We can expand these meaning to the term mass media. From what we have learned, we define it as “a means of communicating to a mass, or large number of people”, according to Schrank.

 

Nowadays as technology advances, the mass media is including more and more communication methods, such as newspapers, magazines, cinema films, radio, television, the World Wide Web, billboards, books, CDs, DVDs, videocassettes, computer games and other forms of publishing.  Researchers show that the penetration of mass media has increased as population increases and ICT advanced.

 

As it has a great influence on people’s minds, the mass media is seen by some governments as important to control, for example, North Korea, while by some societies as important to prevent government regulation, for instance, the US. Particularly in Hong Kong, I think most of the time the mass media will exaggerate the actual facts and sometimes misleading the citizens.

 

Relating to stereotypes, we know that media act as a collective repository & mode of transmission for stereotypes, in which the groups and individuals are represented based on content analysis and coding.

 

 Part 2 A movie review about “Mr. Bean: The Library”

 

Episode Title: Mr. Bean: “Mr. Bean: The Library”

TV Series: “Mr. Bean”

Length: 09:14 mins
Original Air Date
: 5 November 1990
Directed by: John Birkin, John Howard Davies, Paul Weiland
Genre:
Comedy /
Family

 

“Mr. Bean: The Library” is an episode excluded in “Mr. Bean” TV Series and only available on video. In this episode, our poor Mr. Bean accidentally ruined an ancient book in the library thus got into nightmarish trouble when trying to save the book, as well as to hide it from the librarian. Of course, never can he make things better. As a 9-minute long episode, there are only three characters in it, but all of them are very wonderfully acted, not to mention the always funny Rowan Atkinson, even the supporting role of the librarian is quite impressive, who exactly conformed to the common stereotype of librarians.

 

The story took place in a library, in which placed large shelves taller than human body, on which laid in order many ancient looking hard-covered books. In one word, we could smell history and knowledge in the air.  Very few people in it, the library was so quiet, at least before Mr. Bean walked in.

 

Then the old librarian came into screen. It was a polite old gentleman, wearing a dark blue suit and a pair of thick glasses. See? What a stereotypical appearance! Smiling vocationally, the little old man showed his guest by gesture to wait for him at the desk. Note that by this moment, he hadn’t said anything; in addition, he put his finger at his mouth, indicating that speaking was strictly forbidden there. Obviously, the old man had a great hatred upon noises, which was commonly shared by most librarians.

When the old librarian took the book to Mr. Bean, we had chance to have a more detailed look at him. He was so thin, with a clearly-seen cheekbone. Maybe this is the kind of man who lives on “food for thought”.  He carefully put the book in front of Mr. Bean, nodded in response to the guest’s gratitude, and left, still, in silence.

 

The third time we saw him, he was going on a tour of inspection around. Having a serious look on his face, the old man abruptly slowed down his big pace when he came to the backside of Mr. Bean and glanced at the valuable book. He walked with his back particularly straight, kind of like an aristocrat of knowledge.

 

The next time, the old librarian came by to inform the readers that it was closing time. Similarly, he didn’t say anything; instead, he pointed at his watch, indicating that it was time for them to leave. Finally, when opening the wrecked book, the old man stood with his mouth open, having an astonished look on his stuffy face. He together with the innocent reader stared at each other and didn’t know what had happened, until poor Mr. Bean came back for his bookmark.

 

Although the episode is a short one, it successfully depicts such a vivid character of a librarian, who has got a librarian’s look: old, thin, prim, with a pair of glasses; a librarian’s manner: hates noises, seldom speaks, fishy eyes; a librarian’s character: severe, introverted, polite; and a librarian’s working place: the library.  Aha, for the last one I’m just joking. But in one word, the librarian in this episode is really stereotypical. Although it is somewhat exaggerating, the episode shows us what a librarian in real life is like, to a large extent, and personally I quite enjoy this stereotype. For a comedy, as long as it brings people so much fun, who cares whether it should be exactly the fact as in real life? We can see another example of the commonly existing hatred upon noises of a librarian in “Breakfast at Tiffanys”, which is always indicated by his unchanging ‘shush!’ We can also get plenty of pictures about their commonly recognized stuffy looks simply by typing ‘librarian’ in Google. These materials, to a large extent, reflect people’s shared views about librarians, although there also exists some counter stereotypes, here we just take it for granted that the common stereotype for librarians is widely accepted by people all over world.  

 

Part 3 My impressions on librarians

 

I originally thought that a librarian was some one rather introverted, prim, silent and knowledgeable. But as he was companied by books all day long, he couldn’t have a strong body, and most likely, he would wear a pair of thick glasses. What’s more, he would probably be a bookworm, who always had fishy eyes and a pale face.

 

These impressions are partly based on my own experiences in the library when I was a child. At that time I sometimes went to the community library to read books. The extremely quiet circumstance would no doubt make me put my finger on my lips consciously. And the serious look on the librarians’ stuffy pale faces would amplify this effect. They would stare at me whenever I made a noise and till now I still remember the arrow-like cold look in their eyes. Times and again, I have gradually developed an impression that librarians are all severe, cold guys during my early ages.

 

Later, some librarian characters in the cartoons and movies led me to an even negative impression on librarians. For example, I had a rather bad impression of the rude severe looking librarian in “Citizen Kane”, who ungraciously restricted the journalist his access to the materials. What’s more, the librarian as a mind-controller in “Mind Killer” also frightened me. Actually, before I went to university, I had never watched any movie with a positively depicted librarian. Not even once! Thus in the long run, the negative stereotype of librarians went deeper and deeper in my brain.

 

 However, when I was in my home university in mainland China, I met a girl who was an assistant librarian in the university library and from that time, I completely changed my views towards librarians.

 

The girl had a lovely face and a sweet voice. She was quite extroverted and always smiling. She was not wearing glasses and she played basketball so well.  I remembered when I told her about my original impression on librarians and that she wasn’t at all like anyone of them, she burst into laughers and said librarians were also human beings no different from other people, and they had their own joys and pains.

 

First I didn’t quite agree with her words, because the negative stereotype of librarians in my brain was too deep. I thought the reason for her being different lied in the fact that she was only an assistant librarian. Then, with her help, I got to a wide access of movies and books about librarians, in which I found a lot of positively depicted librarian characters, such as the valorous crime-fighting librarian in Jet Li’s “Black Mask”, as well as the mysterious Hogwarts Librarian in “Harry Potter”.

 

Later I also met many librarians who are actually very kind and helpful, thus realized that fact that not every librarian was cold and severe. And my previous impression depends too much on stereotypes. Relating to philosophy, we know that nothing in the world remains static all the time. In fact, things are changing according to complex internal and external factors. It is the same with the librarian stereotype, which has changed significantly in the past several hundred years. Hence, it is improper to apply a traditional stereotype to a brand new group of people.

 

In conclusion, one shouldn’t be restricted by existing stereotypes; instead, one should be critical so as to reveal the truth behind them. Only in this way can we have a better understanding of our society and culture.

 

Part 4 The Islamic stereotype, and analysis

           

Nowadays when people think of Muslims, most likely a quite negative image will emerge. Most people will consider Muslims as a rather radical and dangerous group of people, who are always conducting terrorism attacks around the world. People also consider Islam as a religion of extremism, which will brainwash its believers into suicide bombers and terrorists. In the news reports, we can often hear about suicide bombing happened in Islamic countries, for instance, Iraq, Palestine, Lebanon, and so on. We can also read a lot of this kind of events in the newspaper and the Internet.

 

I guess at first, most people would be astonished and feel rather sorry for the attacker. But when it was happening more and more frequently, people became annoyed and their attitude also became antipathic. Especially after the tragedy of 11/9 in the United States, it seems that the whole world has got into a desperate fear of the Islamism.  And from then on, the questions about Islam have recurrently become a popular topic in the mass media.

 

In order to demonstrate my view points, I simply made a test. First, I opened the web site of FOX News, which is a popular American news media. Immediately I saw these well-marked headlines: “10 Killed in Iraq”, “Iran: Sanctions Would Raise Oil Prices”. See? Both are about Islamic events. Then I visited the web site of another popular American mainstream media, CNN. As expected, what I saw in the top of the screen was “2 suspected terrorists killed in Iraq” and “Indian hostage killed in Afghanistan”. It seems American medias have a common interests in the events happening in the Muslim world, particularly those related with violence. Then I opened the web site of BBC news, I found actually there was also a lot of news about violence relating to Islamic people, with the headlines like “Iran attacks Iraq Kurdish area”, “Thirty die in Iraqi city battle”, “Triple blasts rock Egypt resort”, etc. Note that BBC is not an American corporation, and it shouldn’t has the paranoid belief that Islam is a more violent and dangerous religion than, say, Christianity, hence it should has no bias upon Muslims when selecting news. But the truth is, the mass media all over the world is having a higher priority for the 'violent Muslims' than violent people in other places, which has already become a international news definition about newsworthy.

 

In fact, the stereotype of Islamic people in the mass media is always quite negative. For a long period of time, newspapers have used keys phrases such as extremists, terrorists and fanatics to describe the Muslims. In news reports, oil price hikes were often justified as the Islamic nations’ thirst for money. This is validated by statements such as "the world's supplies of oil and price levels are manipulated and controlled by greedy Arabs" made by an Editor of The Washington Post. In many western movies, Muslims are depicted as villains and idiots. For example, in the movie”True Lies”, not only were the Muslims in the film religious fanatics keen on destroying the world, they were also sexist, racist and stupid. They even failed to complete their mission because of errors which a five year-old could have avoided.  Another example lies in “Not Without My Daughter”, which depicted a wife’s experiences in a Islamic family. Throughout the film, women belonging to the Islamic circle are portrayed as submissive slaves. The husband is portrayed as someone corrupted by his Islamic religion; a man turns into a wild, fanatic religious zealot.

 

If we apply the theorem of outgroups, we will easily discover that, no matter from which of the following perspectives, anthropology, religion, nation, democracy, even matrimonial custom, Muslims are outgroups to us. So it’s not strange that in our self-fulfilling process, we developed a negative stereotype for them. In addition, there also involves political factors, which I will not analyze in details here.  What I want to make clear, is that we should think more critically when encountering stereotypes in mass media. In fact, research into stereotype accuracy has shown that mostly, negative stereotypes are inaccurate; and they to a large extent are exaggeration of the truth. If we go on to apply the stereotyping theorem, we know that the Muslim stereotype in mass media has “overestimated the measured central tendency of the group on negative stereotypic dimensions”. In plain, it means that the group is perceived as more negative than it really is.  Actually, the Muslims are no more than a group of people with different culture with us. According to researchers, half of the world's population belongs to the Islamic faith and Muslims come from nations all over the world such as China, Indonesia, India and the United States. We really don’t have any reason for discriminating against such a large population. Instead, we should be tolerant and understanding towards the Muslims and their culture and treat them in a fair way, so that we, as well as the Muslims, can enjoy a more peaceful world.

 

Bibliography & References

  

Debate on “Islam” back in the media.  (2006, Jan 19).  Retrieved May 1, 2006, from<http://www.voltairenet.org/article134094.html/>

 

Hinton, P. (2000). Stereotypes, cognition and culture. Hove: Psychology Press.

 

Mass media.  (n.d.).  Retrieved April 27, 2006, from <http://en.wikipedia.org/wiki/Mass_media/>

 

Narmeen, E. F. (1996). Arabs and the media.  Journal of Media Psychology, 1(2), 54-70.

 

Shaheen, J. G. (1984).  The TV Arab.  Ohio: Bowling Green State University  Popular Press.

 

Stereotype.  (n.d.).  Retrieved April 27, 2006, from <http://en.wikipedia.org/wiki/Stereotype/>


08 febbraio

[教程] ALTERA UP2 板连IBM攻略

EEE的FirstYearProject发了块板子 这里详细说明如何把它连上自己的IBM本子 在下是折腾了颇久才调试成功的……现把经验贴出 希望可以让大家少走弯路……
 
1 把电源还有传输线什么的都接好 传输线就是连机子背后的Parallel的接口 不过要记得把Parallel Port的工作模式调成ECP 可以在Bios里或者ThinkPadConfiguration里设置效果一样 然后把随书的光盘取出 装MaxplusII的软件 显示的是Baseline而不是StudentEdition 没关系 不用管他
 
2 上Altera的网站弄License 记得一定要选Student&University Programme 那个 而不是Baseline版 填好资料提交 这里会要求你输入硬盘的序列号或者网卡的物理地址 具体方法网页上都有 自己看 成功提交后 邮箱里很快会多一封Altera寄来的邮件里面有个License.dat  的附件 下载下来 存好 网站上会有如何安装License的说明 对Windows熟悉的话按照那个方法应该可以轻松弄好
 
3 在光盘里根目录下有一个MaxplusII 10.22的升级文件 很容易找到的 一定要运行! 否则不支持随板的那条ByteblasterII的传输线 当然也可以到网上去下载更新的10.23版 只是也一样要填一堆资料 比较麻烦
 
4 在硬盘里MaxplusII软件安装的目录下 有这么一个文件夹 MaxplusII\Drivers\i386 里面有个叫bblpt.exe的文件 这个就是安装ByteblasterII传输线驱动的关键 从开始菜单->运行 cmd 注意这里是cmd而不是command 这两者是不同的 进入刚刚那个MaxplusII\Drivers\i386里 运行bblpt /i 就可以顺利安装驱动 至于Dos下的操作 就不再赘述了
 
上面的每一步都要做 否则会出现Project可以打开而无法Download到板子上的情况或者是软件无法使用的情况 全都做到如果还是不行的话那就只能说是RPWT了
30 dicembre

刚帮某人写了篇很诡异的文章……

A Second Thought on Abraham Lincoln

 

Abraham Lincoln is commonly known as one of the greatest presidents in American history. As a man of excellent leadership and great responsibility, Lincoln had led the country out of times of crisis and got it into prosperity and stability. His policies also had a lasting influence on American political and social institutions after his death. However, what interests me most, is not his policies as a president, but his attitude towards people of different races.

 

As is known to all, Lincoln put an end to slavery in America. It is commonly believed that it was because of Lincoln’s belief on the equality between all men, however, according to his speech in the famous “Lincoln-Douglas debates of 1858”, Lincoln was “not, nor ever have been in favor of bringing about in any way the social and political equality of the white and black races”. He believed that “there is physical difference between the white and black races which I believe will for ever forbid the two races living together on terms of social and political equality.  Then you may ask why he was so enthusiastic in ending slavery? The key point was that he was a Republican president of the country and opposition to slavery expansion was the key issue uniting the Republican Party at the time. And as the southern states where slavery was encouraged seceded from the Union and formed a country of their own, it was an effective method to weaken them by stirring up the discontentment of the black people in the south, who were actually the economic base of the rebelling southern states. It later proved to be a wise decision to make abolishing slavery in the rebel states an official war goal.

 

After the war, Lincoln planned to move the nearly 4 million newly freed slaves to Africa and South America, but his attempt wasn’t successful. Later in 1862, by signing Homestead Act into law, Lincoln has indirectly driven the Indians out of their original living places, and the frequently happening conflicts between settlers and Indians caused a great many deaths. Later it turned out to be a government-acquiescent exploit and massacre to the aborigines.

 

Lincoln said the following words in his second inauguration address, “With malice toward none, with charity for all, with firmness in the right as God gives us to see the right, let us strive on to finish the work we are in; to bind up the nation's wounds; to care for him who shall have borne the battle, and for his widow and his orphan - to do all which may achieve and cherish a just and lasting peace, among ourselves, and with all nations.” It seemed that a perfect world for all the people had been created. Actually this “perfect” is only for the white people living there. For the other races living in America, life is extremely hard. They weren’t even being treated as citizens even until the last scores of years. Of course, we couldn’t blame Lincoln for that.

 

In general, Lincoln was a great leader, a noble man; he considered the country’s benefit to be the most important thing. But his time limited his eye sight and he couldn’t see the inner spirit of “equality”. But who can judge this word? After all no one is Jesus.

30 novembre

偶的Assembly程序 放上来吓人~

其实会整齐很多的 只是复制过来格式就变了汗
* This program performs the following:
* i) Reads in a sequence (X,Y)coordinates of 4  points, sign-extend each parameter to 16-bit.
* ii)Compute the Manhattan distance(e.g. |x1-x2|+|y1-y2|) between each pair of points, 6 in total.
* iii) Sort the results in ascending order.
*Algorithm of absolute value part:
*   In order to get the absolute value of a 16-bit negative number stored in accumulator D , do 2 steps:
* 1. Replace A by its 1's complement
* 2. Replace B by its 2's complement
*Algorithm of sorting part:
*   The algorithm consists of repeated scans. Each scan consists of 2 steps:
* 1. Compare a(1) and a(2), if a(1)<=a(2),then do nothing;otherwise if a(1)>a(2), swap the positions of a(1) and a(2).
* 2. Continue the same process with the successive pairs until the last pair a(5) and a(6) are processed.
*   After one scan(step 1+2 above),
* if swap of positions has occurred at least once, perform another scan, otherwise
* if no swap occurs, stop
*---------------------------------
*Declaration and memory location
*---------------------------------
PROGRAM  EQU $E000  ;ROM for storing main program
SCAN  EQU $E400  ;ROM for subroutine SCAN
SWAP  EQU $E800  ;ROM for subroutine SWAP
SIGN_EXTEND   EQU  $EC00 ;ROM for subroutine SIGN_EXTEND
RESET  EQU $FFFE  ;RESET VECTOR
  ORG $0000  ;Input data area
INPUT:  DS 8        ;Reserve 8 bytes for the 4 points
  ORG $000A  ;Counter for the whole program
COUNTER: DS 1  ;Reserve 1 byte for the counter
  ORG $000B  ;Counter for loop
COUNTER1: DS 1  ;Reserve 1 byte for the counter
 
         ORG    $0010    ;Output data area
OUTPUT:  DS     12       ;Reserve 12 bytes for the 6 16-bit results
  ORG $0020  ;Temporary variables
FLAG:  DS  1  ;Flag to indicate integer swapping
TEMP1:  DS 2  ;Reserve 2 bytes for temporary storage location
*---------------
* MAIN PROGRAM
*---------------
  ORG PROGRAM
START  LDX #INPUT  ;Use register X to point to input data block
  LDY #OUTPUT  ;Use register Y to point to output data block
  CLR OUTPUT
  CLR OUTPUT+1
  CLR OUTPUT+2
  CLR OUTPUT+3
  CLR OUTPUT+4
  CLR OUTPUT+5
  CLR OUTPUT+6
  CLR OUTPUT+7
  CLR OUTPUT+8
  CLR OUTPUT+9
  CLR OUTPUT+10
  CLR OUTPUT+11 ;Clear all the output areas
       
* Process pair1&pair2,pair2&pair3,pair3&pair4
  LDAB #$3
  STAB COUNTER  ;Initialize counter to 1
LOOP1:   LDAB #$2
  STAB COUNTER1 ;Initialize counter1 to 1
LOOP2:  LDAB $00,X  ;get input data in accumulator B
         JSR SIGN_EXTEND   ;subroutine to do sign extend, result in D
  STD TEMP1  ;store [D] in TEMP1
  LDAB $02,X  ;get input data X2 in accumulator B 
         JSR SIGN_EXTEND  ;subroutine to do sign extend, result in D
  SUBD TEMP1  ;substract [D] with X1
  BGE    OK  ;If it is a positive value, branch to OK
  COMA   ;Replace A by its 1's complement
  NEGB   ;Replace B by its 2's complement
OK:  ADDD $00,Y  ;Add D with result
         STD $00,Y  ;Store updated [D] 
  INX   ;Increase X by 1
  DEC COUNTER1 ;Decrease counter1 by 1
  BGT LOOP2  ;Not finish? Go on to process Y
  INY
  INY   ;Increase Y by 2
  DEC COUNTER  ;Decrease counter by 1
  BGT LOOP1  ;Not finish? Go on to process the next pair
* Process pair1&pair3
  LDX #INPUT   ;Use register X to point to input data block
LOOP3:   LDAB #$2
  STAB COUNTER1 ;Intialize counter1 to 1
LOOP4:  LDAB $00,X  ;get input data in accumulator B
         JSR SIGN_EXTEND   ;subroutine to do sign extend, result in D
  STD TEMP1  ;store [D] in TEMP1
  LDAB $04,X  ;get input data X3 in accumulator B
         JSR SIGN_EXTEND  ;subroutine to do sign extend, result in D
  SUBD TEMP1  ;substract [D] with TEMP1, result in D
  BGE    OK1  ;If it is a positive value, branch to OK1
  COMA   ;Negative value, replace A by its 1's complement
  NEGB   ;Replace B by its 2's complement
OK1:  ADDD $00,Y  ;Add D with result
         STD $00,Y  ;Store updated [D] 
  INX   ;Increase X by 1
  DEC COUNTER1 ;Decrease counter1 by 1
  BGT LOOP4  ;Not finish? Go on to process Y
* Process pair1&pair4
  DEX
  DEX   ;Use register to point to pair 1
  INY
  INY   ;Increase Y by 2
LOOP5:   LDAB #$2
  STAB COUNTER1 ;Intialize counter1 to 1
LOOP6:  LDAB $00,X  ;get input data in accumulator B
         JSR SIGN_EXTEND   ;subroutine to do sign extend, result in D
  STD TEMP1  ;store [D] in TEMP1
  LDAB $06,X  ;get input data in accumulator B
         JSR SIGN_EXTEND   ;subroutine to do sign extend, result in D
  SUBD TEMP1  ;substract [D] with TEMP1
  BGE    OK2  ;If it is a positive value, branch to OK2
  COMA   ;Replace A by its 1's complement
  NEGB   ;Replace B by its 2's complement
OK2:  ADDD $00,Y  ;Add D with result
         STD $00,Y  ;Store updated [D] 
  INX   ;Increase X by 1
  DEC COUNTER1 ;Decrease counter1 by 1
  BGT LOOP6  ;Not finish? Go on to process Y
* Process pair2&pair4
  INY
  INY
LOOP7:   LDAB #$2
  STAB COUNTER1 ;Intialize counter1 to 1
LOOP8:  LDAB $00,X  ;get input data in accumulator B
         JSR SIGN_EXTEND   ;subroutine to do sign extend, result in D
  STD TEMP1  ;store [D] in TEMP1
  LDAB $04,X  ;get input data in accumulator B
         JSR SIGN_EXTEND   ;subroutine to do sign extend, result in D
  SUBD TEMP1  ;substract [D] with TEMP1
  BGE    OK3  ;If it is a positive value, branch to OK3
  COMA   ;Replace A by its 1's complement
  NEGB   ;Replace B by its 2's complement
OK3:  ADDD $00,Y  ;Add D with result
         STD $00,Y  ;Store updated [D] 
  INX   ;Increase X by 1
  DEC COUNTER1 ;Decrease counter1 by 1
  BGT LOOP8  ;Not finish? Go on to process Y
* Perform repeated scans
LOOP9: LDAA #$00
 STAA FLAG ;initialize flag to indicate swapping status
 JSR SCAN ;perform scanning on the input integer sequence
 LDAA FLAG ;examine flag, has swapping occurred?
 BNE LOOP9 ;perform another scan if swapping did occur
LOOPA:  BRA    LOOPA  ;Job done, no more work, just keep looping here
*--------------
* SUBROUTINES
*--------------
* SUBROUTINE SIGN_EXTEND
  ORG SIGN_EXTEND ;subroutine to swap positions of two integers
  BITB #$80  ;Test the leading bit of operand in B
  BEQ POSITIVE ;If integer is positive or zero, branch out.
  LDAA #$FF  ;Integer is negative set higher byte to $FF
  RTS   ;Return to calling program
POSITIVE:
  LDAA #$00  ;Integer is positive, set higher byte to $00
  RTS   ;Return to calling program
* SUBROUTINE SCAN
 ORG SCAN ;subroutine to perform one scan
 LDX #OUTPUT ;point register X to start of output data block
 LDAA #$5 
 STAA COUNTER ;initialize COUNTER as 5
LOOP10: LDD $00,X ;get current integer
 CMPD $02,X ;compare with next integer
 BLE OK4 ;if less than or equal to next integer, don't swap
 JSR SWAP ;otherwise, swap positions of the integer pair
OK4: INX
 INX  ;point to the next pair
 DEC COUNTER ;decrement counter
 BNE LOOP10 ;not finished?  process next pair
 RTS  ;finished, return
* Subroutine SWAP
 ORG SWAP ;subroutine to swap positions of two integers
 PSHA            ;save original contents of accumulator A
 LDD $00,X ;read first integer
 STD TEMP1 ;store the first integer to temporary location
 LDD $02,X ;read the next integer
 STD $00,X ;move the next integer one place forward
 LDD TEMP1 ;read the saved copy of the first integer
 STD $02,X ;copy the first integer one place down
 LDAA #$01 
 STAA FLAG ;set flag to 1 to indicate swapping done
 PULA            ;restore original contents of accumulator A
 RTS  ;finished, return
*---------------------------------------------
*Define reset vector(program starting address)
*---------------------------------------------
  ORG RESET 
  DW START  ;Initialise reset vector
26 novembre

偶的C++程序 一个五子棋游戏的模型……没有AI

#include <iostream>
#include <fstream>
#include <cstring>
#include <string>
using namespace std;

class Game
{
private:
 unsigned int dimension;
 int winning;
 char playerd;
 int status;
 char board[11][11];
 int count;

public:
 Game(unsigned int N, unsigned int W);
 Game();
 int move(char player, unsigned int vert_coor, unsigned int hori_coor);
 static string getID();
 string dump( );
 int Game::save(char *filename);
 int Game::load(char *filename);
};


Game::Game(unsigned int N, unsigned int W)
{
 status=0;
 dimension=N;
 winning=W;
 playerd='X';
 count=dimension*dimension;
 for(unsigned int i=0;i<N;i++)
 {
  for(unsigned int j=0;j<N;j++)
  {
   board[i][j]='.';
  }
 }
}

Game::Game()
{
 status=0;
 dimension=3;
 winning=3;
 playerd='X';
 count=dimension*dimension;
 for(int i=0;i<3;i++)
 {
  for(int j=0;j<3;j++)
  {
   board[i][j]='.';
  }
 }
}

int Game::move(char player, unsigned int vert_coor, unsigned int hori_coor)
{
 int count1=0;
 bool win=false;
 if(player!=playerd) {status=-3; cout<<"Not player "<<player<<"'s turn."<<endl;
 }
 else if(status==0||status==-2||status==-3||status==-4)
 {
  if(board[vert_coor][hori_coor]=='.')
  {
   board[vert_coor][hori_coor]=player;
   count--;
   if(player=='X') playerd='O';
   else if(player=='O') playerd='X';
   for(unsigned int i=0;i<dimension;i++)
   {
    if(board[vert_coor][i]==player) count1++;
    else if(board[vert_coor][i]!=player) count1=0;

    if(count1==winning) win=true;
   }
   count1=0;

   for(unsigned int i=0;i<dimension;i++)
   {
    if(board[i][hori_coor]==player) count1++;
    else if(board[i][hori_coor]!=player) count1=0;
    if(count1==winning) win=true;
   }
   count1=0;

   if(vert_coor>=hori_coor)
   {
    for(unsigned int i=0;i<dimension-vert_coor+hori_coor;i++)
    {
     if(board[vert_coor-hori_coor+i][i]==player) count1++;
     else if(board[vert_coor-hori_coor+i][i]!=player) count1=0;
     if(count1==winning) win=true;
    }
   }
   else if(vert_coor<hori_coor)
   {
    for(unsigned int i=0;i<dimension+vert_coor-hori_coor;i++)
    { 
     if(board[i][hori_coor-vert_coor+i]==player) count1++;
     else if(board[i][hori_coor-vert_coor+i]!=player) count1=0;
     if(count1==winning) win=true;
    }
   }
   count1=0;

   if(vert_coor+hori_coor<dimension)
   {
    for(unsigned int i=0;i<=vert_coor+hori_coor;i++)
    {
     if(board[i][vert_coor+hori_coor-i]==player) count1++;
     else if(board[i][vert_coor+hori_coor]!=player) count1=0;
     if(count1==winning) win=true;
    }
   }
   else if(vert_coor+hori_coor>=dimension)
   {
    for(unsigned int i=1;i<2*dimension-vert_coor-hori_coor;i++)
    {
     if(board[vert_coor+hori_coor-dimension+i][dimension-i]==player) count1++;
     else if(board[vert_coor+hori_coor-dimension+i][dimension-i]!=player) count1=0;
     if(count1==winning) win=true;
    }
   }

  }
 }


 else if(board[vert_coor][hori_coor]=='X'||board[vert_coor][hori_coor]=='O')
 {
  status=-4;cout<<"Cell occupied."<<endl;
 }
 else if(status==1||status==2||status==-1)
 {
  status=-1; cout<<"Game is already over."<<endl;
 }

 if((player!='X'&&player!='O')||(vert_coor>=dimension||hori_coor>=dimension))
 {
  status=-2; cout<<"Parameters invalid."<<endl;
 }

 if(win==true)
 {
  status=1;
  cout<<player<<" wins."<<endl;
 }
 else if(count==0)
 {
  status=2;
  cout<<" Draw."<<endl;
 }
 else status=0;
 return status;
}

 


string Game::getID(){ return ("Zhang Chuan, h0583853");}

string Game::dump( )
{
 string str1;
 for(unsigned int i=0;i<dimension;i++)
 {
  for(unsigned int j=0;j<dimension;j++)
   str1=str1+board[i][j];
  str1=str1+'\n';
 }
 return (str1);
}

int Game::save(char *filename)
{
 string str2;
 for(unsigned int i=0;i<dimension;i++)
 {
  for(unsigned int j=0;j<dimension;j++)
   str2=str2+board[i][j];
  str2=str2+'\n';
 }
 ofstream savegame(filename, ios::out);
 if (!savegame)
 {
  cout << "File could not be opened." << endl;
  return -1;
 }
 savegame<<str2<<" "<<status<<" "<<playerd<<" "<<dimension<<" "<<winning<<" "<<count;
 return 0;
}

int Game::load(char *filename)
{
 ifstream loadgame(filename, ios::in);
 if(!loadgame)
 {
  cout << "File could not be opened." << endl;
  return -1;
 }
 for(int i=0;i<dimension;i++)
  loadgame>>board[i];
 loadgame>>status>>playerd>>dimension>>winning>>count;
 return 0;
}

21 novembre

My Critical Thinking Essay...

E-learning

 

 

Introduction

The issue that why e-learning should be a part of the learning process at university is addressed in this essay. The main question, arising from this issue, is whether it can enhance our learning efficiency. To address this question, this essay will analyze both advantages and limitations brought about by e-learning by making contrasts between them. The purpose of this essay is thus to show that e-learning brings us more convenience than disturbance, as more convenience enhances efficiency. The results show that in general, e-learning is an up-to-date learning mode, which will then lead to the conclusion that it should be a part of the learning process at university. This study confirms the importance of e-learning in university education, and reveals a better learning method for university students.  In short, this essay addresses the issue of e-learning by comparing its superiority with inferiority in order to show the significance that it should be included in the learning process at university.

 

Main Body

 

Definition

E-learning, as defined by educationist, is “The delivery of a learning, training or education program by electronic means. E-learning involves the use of a computer or electronic device in some way to provide training, educational or learning material.

 

Advantages

According to the definition, it is obvious that e-learning is quite easy to access, which is also its most significant advantage. With a computer and an Internet connection, one can obtain the information in his field by simple operation, wherever and whenever. Thus it can be asserted that by e-learning students are free to make their learning arrangements, which will increase individual efficiency, as it’s quite possible that students have different active cycles. Furthermore, students might come across a clash of time slots because of unexpected incidents, e.g. illness, meetings, parties, etc, which will cause much inconvenience to the learning process. The flexibility featured by e-learning makes it possible for students to reduce this inconvenience to the minimum.

 

There might be counter-arguments focused on the excess access of information. This position goes on to assert that students will become used to employing existing resources without thinking instead of seeking the answers on their own. However, as Newton once said, "If I have seen a little further, it is by standing on the shoulders of Giants.” All the current studies are based on achievement made by our predecessors. And only by understanding more about the previous theories can we make improvements and creations. In addition, it is the students’ attitude rather than the existing information that determines how one can make use of the resources available. Thus appropriate instructions and restrictions are expected to be provided so as to guide the students in their learning process.

 

Another significant advantage of e-learning is its wide range and variety of information. With the aid of electronic devices, students can build a more general system of knowledge. As philosophers claim, all things in the world are relatively interdependent. Thus more detailed and completed results can be given out in the end.  Furthermore, wide range of information will cultivate a broader vision, which will definitely increase students’ adaptability to the society and the world outside campus.

 

Some people might argue that e-learning will cause an explosion of information. Most students, so this argument goes, will become confused about how to choose what they really need from the huge amount of information available in all means, e.g. videos, audios, online resources etc. It is claimed that e-learning blurs students’ aims and wastes their time. However, as psychologists explain, people learn best when they use all their senses, e.g. seeing, hearing, touching etc, to explore the unknown. In fact, students’ confusion is caused by the lack of guidance rather than large amount of information, and e-learning doesn’t mean the absence of guidance. Moreover, through e-learning students can get both rational and sentimental viewpoints, which will avoid extreme ideas from occurring thus help to build a balanced way of thinking.

 

Limitation

The major limitation of e-learning is the lack of face-to-face interaction between teaching staff and students, and between students themselves. Unnecessary misunderstandings, so this argument goes, will occur, leading the students to completely wrong ways. It is claimed that learning efficiency will be greatly decreased. However, as educationists state, our learning process is based on “trial and error” method. In fact, students gain even more experiences when going into wrong ways than achieving success at the first time. Moreover, interaction can be done through electronic methods such as online forum, email, and real-time communication software such as ICQ. Because these means are more personal, the response can be even more pertinent and helpful.

 

Conclusion

In conclusion, it is essential that e-learning be a part of the learning process at university.  As e-learning provides easy access to a wide range and variety of information as well as convenient communication methods, its advantages are so significant that the merits outweigh its limitations. By applying e-learning in universities, learning efficiency of students can be greatly enhanced, which will lead to improvement in the quality of university education. In the long term, the whole society will be enriched economically, socially and culturally. If we just stick to the traditional ways of learning, we will lag behind the modern world. The limitation of the current study is that little has been concerned about other e-learning means besides using computers and Internet. Further investigation should be carried out on the usage of other electronic devices. Finally, this study elucidates the significance of e-learning at university, and meanwhile point out a better learning method for university students.