ASTRA-256 Assembler

ASTRA-256 Assembler

评价数不足
ODDS AND EVENS
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
1.022 KB
2020 年 5 月 15 日 上午 7:18
1 项改动说明 ( 查看 )

订阅以下载
ODDS AND EVENS

描述
The program implements the simplest algorithm of machine learning. It tries to guess if the number you have in mind is even (0) or odd (1). This game has many names: ‘Gerade und Ungerade’, ‘Heads or Tails’, ‘Chetno i likho’.

The program performs the following sequence:

- At boot, sets the initial values in memory (it may take about 1 min.);
- The HALT LED lights up red, prompting you to think of a number. If you did, press ENTER;
- The number you can conceive is either even (0), or odd (1). The program will try to ‘guess’ the number by highlighting 0 or 1 on the keyboard. In this case, the HALT LED lights up yellow;
- In response, you have to press the number you have in mind, on the keyboard (0 or 1);
- If the program guessed correctly, it will add “1” to its account displayed in the cell F2h. If it doesn’t, it will increase your score displayed in the cell F4h;
- Then the whole process repeats. The longer you play, the more the program learns to predict your behavior.

Program Listing:

INITSP
MOVLR 70h 6Eh
CALL 22h
CALL 39h
HLT
CALL 4Bh
MOVRA F1h
ORLA 40h
OUTKBD
CALL 40h
CALL 59h
MOVRA F3h
XORRA F1h
JZFZ 1Eh
INCR F2h
JMP 06h
INCR F4h
JMP 06h
MOVLR 7Fh F5h
MOVLR 01h F3h
MOVRA F3h
XORLA 01h
MOVAR F3h
MOVRR F5h F0h
CALL 59h;
LOOP F5h 2Ah
RETURN;
MOVLA 01h
OUTKBD
MOVLA 00h
OUTKBD
RETURN;
INKBD
MOVAR F6h
SUBLA 02h
JCFZ 40h
MOVRR F6h F3h
RETURN
MOVRA F0h
ANDLA 7Fh
ADDRA 6Eh
MOVAR 6Fh
MOVAR 56h
MOVRR 00h F1h
RETURN
MOVRA F0h
ANDLA 7Fh
ADDRA 6Eh
MOVAR 6Fh
MOVAR 65h
MOVRR F3h 00h
MOVRA F0h
SHIFTLA
ORRA F3h
MOVAR F0h
RETURN
2 条留言
Kentawrus 2021 年 10 月 27 日 下午 9:17 
Бляха сделайте кто нибудь гайды на ютубе для тех кто в асемблерах не шарит это пытка купил прогу просто лежит.А я пока учебник дочитаю ............
Son of CYLON 2021 年 10 月 10 日 下午 9:09 
My only question is !
Is it the " real assembly coding " or is it a fake one that resembles it as for a game ??