6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Oct 23, 2024 4:25 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Sep 12, 2016 2:44 pm 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Rejoice, all ye faithful of the one true editor: vim 8.0 is here! And among the changes see https://raw.githubusercontent.com/vim/v ... rsion8.txt), we find this:
Code:
Motorola S-Record syntax
Won't have a chance to try it for a while, but sounds great.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 12, 2016 2:51 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10961
Location: England
Here's my srec loader for BBC Basic, being the other half of the puzzle!
Code:
10DEFFNH:T%=EVAL("&"+LEFT$(A$,2)):A$=MID$(A$,3):C%=C%+T%:=T%
20DEFPROCR:REP.INPUTA$:U.LEFT$(A$,2)="S1":A$=MID$(A$,3):C%=1:ENDPROC
30REP.PROCR:L%=FNH:P%=FNH*256+FNH:FORI%=1TOL%-3:?P%=FNH:P%=P%+1:N.:T%=FNH:IFC%AND255THENP."BADCRC"ELSEU.FA.

(It isn't line noise, although it has been mistaken for line noise.)


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 13, 2016 3:00 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10961
Location: England
Blimey, not just srec, but full-on programming:

Quote:
Lambda and Closure ~

A short way to create a function has been added: {args -> expr}. See |lambda|.
This is useful for functions such as `filter()` and `map()`, which now also
accept a function argument. Example: >
:call filter(mylist, {idx, val -> val > 20})

A lambda can use variables defined in the scope where the lambda is defined.
This is usually called a |closure|.

User defined functions can also be a closure by adding the "closure" argument
|:func-closure|.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: