6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Oct 01, 2024 7:27 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Aug 15, 2019 7:14 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10943
Location: England
I was surprised, perhaps others will be too. The BPF is a mechanism for high performance network filtering, used in the Linux kernel - useful in defending against attacks. (Original paper mentions SunOS, Ultrix, and IRIX rather than Linux.) From this rather technical post:

Quote:
The BPF VM and its bytecode was introduced by Steve McCane and Van Jacobson in late 1992, in their paper The BSD Packet Filter: A New Architecture for User-level Packet Capture, and it was presented for the first time at Usenix Conference Winter ‘93.

Since BPF is a VM, it defines an environment where programs are executed. Besides a bytecode, it also defines a packet-based memory model (load instructions are implicitly done on the processing packet), registers (A and X; Accumulator and Index register), a scratch memory store and an implicit Program Counter. Interestingly, BPF’s bytecode was modeled after the MOS 6502 ISA. As Steve McCane recalls in his Sharkfest ‘11 keynote, he was familiar with 6502 assembly from his junior high-school days programming on an Apple II and that influenced him when he designed the BPF bytecode.


(I've corrected a couple of typos in the quote.)


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 15, 2019 7:26 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1948
Location: Sacramento, CA, USA
He mentions some historic familiarity with the "Motorola 6502" :-\ , but I am having difficulty seeing any similarities between his assembly language examples and any 6xxx assembly language, Motorola, MOS, WDC or otherwise.

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 15, 2019 7:30 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10943
Location: England
I'm going to forgive the MOS/Motorola confusion - so many people have done that.

I think the similarity is to be found in the machine, not the mnemonics: the A and X registers, the available addressing modes. Edit: for comparison, a successor architecture is said to resemble x86_64, with 10 registers of 64 bits each.


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: Google [Bot] and 6 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: