📄 bigstring18.asm
字号:
;Memory filled with strings; All of them are sent only once to UART.
LIST P=18F252
#include "p18f252.inc"
RADIX DEC
__CONFIG _CONFIG1H, b'11111010' ;_OSCS_OFF_1H & _HS_OSC_1H
__CONFIG _CONFIG2L, _BOR_ON_2L & _BORV_20_2L & _PWRT_ON_2L
__CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
__CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
__CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
__CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
__CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
__CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
__CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
__CONFIG _CONFIG7H, _EBTRB_OFF_7H
CBLOCK 0x20
cnt1
cnt2
cnt3
ax
ENDC
variable _tab_cnt=0
;******************** MACROS **********************
SendLWait macro
btfss PIR1,TXIF ;empty?
goto $-2
movwf TXREG
endm
;************************ START *******************
ORG 0x0000
goto init
nop
nop
nop
init
movlw d'10' ; at 20Mhz with 115200 => 10
movwf SPBRG ; at 4Mhz with 19200 => 12
movlw b'00100100' ; TXEN+BRGH
movwf TXSTA
movlw b'10010000'
movwf RCSTA
start
movlw UPPER Table1
movwf TBLPTRU
movlw HIGH Table1
movwf TBLPTRH
movlw LOW Table1
movwf TBLPTRL
movlw 125
movwf cnt2
hop2
clrf cnt1
hop1
TBLRD*+
movf TABLAT, w
SendLWait
decfsz cnt1
goto hop1
decfsz cnt2
goto hop2
goto $ ; freeze
Table_size set Table1_end - Table1
messg #v(Table_size)
;TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
ORG 0x100
Table1
DB "[Since the mid 1970s], AI, in my view, has not made dramatic progress in the direction of programs that have what you call 'gene"
DB "ral intelligence' or 'common sense' or a lot of resourcefulness for handling problems that the programmer didn't have in mind []"
DB ". That's a quarter century. You can ask what happened. Certainly lots of things happened that you could call AI. Optical chara"
DB "cter recognition, machines reading not-too-badly printed text, are pretty good. They only make a mistake every few lines. But th"
DB "ose are not using very different techniques than were available before. The computer is a thousand times faster, or more. Most p"
DB "eople in AI are either working on trying to represent knowledge in the form of mathematical logic, which reveals a lot of proble"
DB "ms, but doesn't give us good solutions. The reason I don't care for logic is that I think the kind of reasoning that people find"
DB " useful in real life is reasoning by analogy. What I mean by reasoning by analogy is: of course if you see a problem exactly lik"
DB "e one you've seen before, then you can just remember the solution. But in real life that almost never happens. There are always "
DB "some things different. So you look at this problem or situation and say, what worked' What do I remember about solving a similar"
DB " problem in the past' That word 'similar' means that you're looking in your records for a case that has some features or propert"
DB "ies or functionality that's the same as this problem, and other features that are different. Then you have to ask, which of thes"
DB "e features are important' If they're not important, then who cares. If it's different in important features, then you want to ge"
DB "t a sub-goal, which says, how can I change this problem so that it will better fit that one. So it seems to me that most of what"
DB " we call 'problem solving' is figuring out how to fit the present case to situations which you've seen before, which aren't the "
DB "same. Mathematical logic is no good at this. It's very hard to represent meta-knowledge about which features of things are imp"
DB "ortant because it's hard to express what you mean by important. What is important' It might be something like, 'it will reduce y"
DB "our amount of search time'. Most logic is done in some awful thing called the first order predicate calculus, if you'll pardon t"
DB "he expression, which has the virtue that there's some good theorems about it, but it has the trouble that it can't talk about it"
DB "s own deductive processes. That's what we think when you say, I've been working on this for 15 minutes and I haven't gotten anyw"
DB "here, well that's not the most important kind of self-monitoring supervising there could be. But I've never seen that happening."
DB " Now you can sort of simulate it by assigning scores to how long you've searched part of the tree or something, using the alpha "
DB "beta heuristic for controlling searches '[] incidentally, that was invented by Arthur Samuel in the checkers program, and reinve"
DB "nted by John McCarthy because Samuel had explained it so badly. Neural nets, you might think, have that fuzzy quality that if "
DB "two things aren't exactly the same, well it will recognize it anyway. So they're fine. But the trouble with neural nets is that "
DB "they're completely incapable of any reflection. If part of your machine, like the OCR part, uses a neural net to distinguish bet"
DB "ween a P and a broken R, there's no way the rest of the program can know - it's very hard - to disassemble the huge number of li"
DB "ttle numbers hidden in the neural net program and figure out what was the important feature that allowed it to make its distinct"
DB "ion. In principle, you could do that, but I don't know of anybody incorporating neural nets with other kinds of reasoning with a"
DB "ny such interface. Genetic algorithms are very popular. I can't figure out why because, in almost all respects, they are worse"
DB " than the traditional artificial intelligence heuristic search. What genetic algorithms do is use the computers ten thousand tim"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -