AnyCPU http://anycpu.org/forum/ |
|
Black Widow Core http://anycpu.org/forum/viewtopic.php?f=23&t=902 |
Page 2 of 2 |
Author: | oldben [ Sun May 01, 2022 9:13 pm ] |
Post subject: | Re: Black Widow Core |
Check the typing, The last fault I found was in a bios library I was revising. A typo in revised branch label,sent me to a random place in the code. Having had changes just made to the string and printf functions made locating the bug harder. I am moving away from C strings to a Pascal style string with the first byte indicating length. 0 length is a string constant that is null terminated. This way I can later impliment a string data type, in the langauge I am developing. string animal[12] animal = get a animal name() if overflow do string error() if animal = 'duck' print "quack!" -- duck or animal = 'cow' print "moo!" -- cow else print "streak! beer! barmaid!" -- default human fin I have been finding C strings are too quick and dirty for production work having no length, Ben. |
Author: | drogon [ Mon May 02, 2022 5:20 pm ] |
Post subject: | Re: Black Widow Core |
oldben wrote: Check the typing, The last fault I found was in a bios library I was revising. A typo in revised branch label,sent me to a random place in the code. Having had changes just made to the string and printf functions made locating the bug harder. I am moving away from C strings to a Pascal style string with the first byte indicating length. *cough* I think you mean BCPL style strings here Quote: 0 length is a string constant that is null terminated. This way I can later impliment a string data type, in the langauge I am developing. Neither way is perfect and both ways have issues. The BCPL way is limiting although it's not always obvious - writing an editor that supports an arbitrary line length for example... -Gordon |
Author: | oldben [ Tue May 03, 2022 2:36 am ] |
Post subject: | Re: Black Widow Core |
drogon wrote: Neither way is perfect and both ways have issues. The BCPL way is limiting although it's not always obvious - writing an editor that supports an arbitrary line length for example... -Gordon I guess with the wider screens one can have 80x132 text windows. I did it this to way have easy upgrade path, so I can hand port programs in C like my cross assembler to the language I am using for this machine. The correct way is type string { int size; int length, buffer[];} The same could be said for any array type. We have yet to fix bugs with C strings and we keep getting more and more versions of text encoding. Ben. |
Author: | robfinch [ Sat Jul 16, 2022 3:20 am ] |
Post subject: | Re: Black Widow Core |
Just looked at this core briefly after leaving it for a while. For some reason I added SETxx instructions to the ISA when there were already CMPxx instructions doing the same thing. It must have been when I was working away at two different times. |
Page 2 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |