Our next panel is talking about branding at the dispensary level, and as you know in some markets There's not a lot of dispensaries and so you know you really have a limited choice But we have other states where there are loads of dispensaries and so it starts to get really competitive as to bringing in the consumer into your dispensary and how that dispensary looks and feels you know really Identifies who you are and could make the difference between someone walking in your door versus The one next door. I know in some Municipalities, it's very limited where you can locate dispensaries so they all end up clustered together And so that's also an issue right now This panel is going to talk about that about really creating your identity and your brand at the dispensary level and Brian Lovre He is with mmlg which is a cannabis consulting firm. He's going to be moderating this panel And we'll let him take it from here and introduce our best Thank you so much. Sorry. Thank you so much Debra. Welcome everyone. We hope you're having a great time at Green Market Summit so far Thank you again for attending our panel. My name is Brian as Debra explained. I work with mmlg We're based in Los Angeles, but I live in New York So you're welcome for all of the stereotypes about New Yorkers wearing black constantly To my to my right to your left. Yeah, that's how it works I'm where I'm joined by Blythe as well as Eric. Eric is the CEO of Jushi and Blythe Why don't you lead first explain your role with Jushi as well as Beyond Hello and we'll just get started Hello Blythe Ustis here. I am the VP of retail operations for Jushi I oversee a dispensary named Beyond Hello and I first started my career actually in Arizona in 2010 Prop 203 passed for medical cannabis and I joined a group there and spearheaded the opening of multiple dispensaries in Arizona worked in that market for several years and in late 2017 actually joined a new group who had permits to open up dispensaries in Pennsylvania so I relocated to Pennsylvania and At that point the the first project that I was in charge of was developing a name an identity and a brand for Dispensary and that was Beyond Hello Thank you so much excuse me. Thank you so much Blythe Eric Why don't you take a moment to introduce yourself explain how you got into cannabis if you'd like? Absolutely, my name is Eric mouth. I am the president and co-founder of Jushi. We're a multi-state operator We have operations in Virginia, Pennsylvania, New York, Illinois, Ohio, Las Vegas and in California So I had a a non-traditional path into cannabis. I was 25 years on Wall Street. I retired four years ago We've been investing into the cannabis space privately and You know, I'd say over the last four or five years have really seen how large and complicated this business is and Two and a half years ago Elected to actually start our own multi-state operator. We thought there was a tremendous lack of highly qualified management teams the market needed to consolidate and We thought it was a great time to raise capital and consolidate into the sector and it's been a it's been a fantastic Journey so far. Thank you. It's a yeah, not a bad business if you can get into it, right? All right, so anyways folks We're here today to talk to you about branding and marketing at the dispensary level at the retail level and there may be some of you out They're wondering why branding why marketing at this level, but you know when you think about it from a consumer or from a patient standpoint The the retail location and this the structure the aesthetics the vibe that you get in one of those locales is So central to what your consumer experience to what your purchase process is like as a patient in a medical state Or just as someone in an adult use state as well And so life, why don't you walk us through why? Branding is so critical for you know, something like Beyond Hello and how Beyond Hello sort of evolved So One of the first projects as I said was developing a brand And ultimately we recognized that that's developing an identity and an opportunity to also develop something That's a differentiator. So we worked with a branding company and After several hours of interviewing and asking questions We Came to the birthing of Beyond Hello and ultimately, you know, we say it's two small words But with massive implications beyond hello going beyond a hello beyond the Transaction and really starting to have open honest dialogue and conversations with our patients With our consumers with the community with medical pros And so what we what we really did is we wanted to focus on the consumer and the patient and the experience so you can have Product pricing and people and sometimes at our Level you can't really control the product or the pricing per se But what you really can control are the people that you have representing your brand so we've been hyper focused on staffing hyper focused on training on Making sure that everybody we have working for us our experts and know the product But also maintain a Very strong element of customer service. So Really when you walk into our space, what do you feel? What's what's your experience and I? Genuinely believe that positivity is palpable. I think that you can walk into a space and feel the energy So part of our job is to create a happy healthy environment that our patients because in Pennsylvania We're we're medical that our patients want to be in and really Making sure that from start to finish They've enjoyed their experience because they can go somewhere else and sure location is incredibly Important, but if somebody has a choice between two locations that are relatively close They're going to go to the place where they know they can just have a Phenomenal experience that they're confident in their purchase and that they were really well taken care of Absolutely, Eric. Do you mind just taking a moment as well to sort of walk us through? What jushi saw with beyond hello and what was really sort of the process in terms of What drove you guys to build it out in the way that you guys have? Yeah, absolutely, you know, I think You know, we've always had kind of a two-prong strategy One to build businesses in the adult use markets like California and Nevada Where you have, you know really quite deep product expertise and capabilities you have great variety You have actually a relatively con you know the consumer in In California is quite quite educated versus what you see out east where you know at this stage places like New York and New Jersey and Pennsylvania are still very much medical markets I'd say, you know, I still remember the first time I met Blithe We walked into the first dispensary that they had opened in Pennsylvania and when you walked in you really did get a feeling that this was a lot more like a a California-based facility the product selection because of the state is actually quite forward-thinking so the product selection is quite quite quite wide Blithe really had done a fantastic job in making it feel warm and welcoming. It doesn't feel sterile or nor does it feel overwhelming And then the staff, you know, I think this is all about training now in a in a medical market Clearly you you have patients who have gone to a physician to get a card to treat a certain issue they have and so if you have a pain Issue you come in for your pain So so it's really important for us at the at the at the dispensary level to to understand what the Patient needs and you know, I think you know when we looked at that I think we've learned a lot and we've learned a lot about the education process of what what what we need to do within cannabis and you know quite frankly how Uneducated the general consumer is on dosing on variety and also the various Aspects that you can use cannabis in your everyday life. You don't just need it for a certain outcome. Oh, yeah, I mean I think that So many of us in California or again who work with California companies even though we wear black and are based in New York Something we see is a degree of sophistication in terms of consumers in terms of patients in terms of what we know, but What's really difficult for us to sometimes pause and take a step back and recognize is that? So much of the rest of the country is not there From an information standpoint from an education standpoint from a sophistication standpoint So now Blythe if I am John Q. Public and I'm walking into a any Pennsylvania dispensary I may I may be getting a different Experience than what I would get at Beyond Hello. Why don't you walk us through? some of the intricacies of Pennsylvania with regards to having medical staffers and then sort of how that helped you to mold and shape what you really thought was a patient-facing experience so Pennsylvania has a unique requirement in its medical program Where you have to have a medical professional on staff during all hours of operation? So we obviously had to abide by that and be compliant But through that experience we really identified just how valuable that is The sense of comfort that it provides to the consumer We are prepared to see everybody from the new to cannabis consumer and the experienced consumer alike But she'd be surprised people who are that you know Experienced consumer maybe never had an opportunity to speak with a medical professional In a dispensary environment and ask some of those Questions so it's been really fascinating Seeing how even our perspective of having a medical professional on staff has evolved So when somebody comes in to one of our stores The medical professional is first checking their records that are provided by the Department of Health looking at what ailment they qualified for Understanding if there are any restrictions that a doctor in Pennsylvania has placed with regard to what products they can actually consume And then from there, you know, we ultimately try and understand what that patient is looking for in their experience So if they want more of a hands-off experience and they want to wave to our medical pro and go work with one of our patient Consultants, that's fine if they want their hand held and to work side-by-side with the medical pro We offer that too But in the end, you know, it's also incredibly important that our teams are able to talk through an entire consumption process with with the patients and Understand dosing and titrations and methods of consumption So again, I mean it just kind of goes back to making sure that everybody is so well trained and passionate about the product and professional and Ultimately ensuring that the consumption is responsible. That's really insightful Something else I wonder I'll get I'll get back to you Eric. Don't worry, but I have a follow-up question for Blythe And I actually better than I am I Want your opinion on this as well, but I just want to roll with Blythe for another moment Blythe when we're talking about branding and you know as we've seen in California, Colorado Nevada Arizona, Pennsylvania What we will see in states like Missouri and Illinois as they roll out their plans There's really, you know an influx a constant constant influx almost a flood of Competition it's a very crowded retail market For beyond hello and for juicy at large What are some of the steps via the medical aspect? But other just broader branding notions that you guys have implemented to help differentiate Sure, so I think Ultimately what makes beyond hello so sticky and have this expansion ability Is that it's believable and it's real and it's true I genuinely believe in the brand and what our mission is and When that's clearly conveyed to the people who are joining the organization and then they Believe it and they get behind it and there are these ambassadors for your brand and their advocates for what you're doing then the patient comes in and They're talking to the employee and they can see that that employee believes it it just becomes real and tangible and You really, you know can feel good about what you're doing and what you've experienced and I think ultimately That's been the cycle that we've seen we believe it our employees believe it the people they help them believe it and then they go out to their friends and family and talk about it and They can feel good about what they've done because They're confident in their purchase. They're confident with who they purchased from they know that we're curating products and making sure that we have the best products available for safe and responsible consumption Eric do you have anything to add to that? That was a a plus response from Blythe, but Eric I know that you you've had a hand in this as well. So Yeah, yeah, I would challenge one of your statements that you think this is an overcrowded retail market You know, I think we take a very different stance on that. We actually think that this is a very underserved retail market You know and I'm talking Nationally it's clearly state-by-state. There's differentials, but just across the US being a multi-state operator I look at the entire country not just regions although we break each region up one You know, I don't believe that there is an abundance of safe clean tested Well curated highly trained staff that can really service the new customer So if we just going to be out there servicing the traditional stoner who we you know There's the old rule that you know 80% of your sales is 20% of the people that come in I think that is definitely a business model and that's a business model I think you can pursue and you must probably would be quite successful if you believe that over the next decade Cannabis as a product and the cannabinoids within the entire spectrum of that they exist Will become a much bigger part of many people's daily health regime However, you want to think of that, you know our largest purchase a douchey as a founding company was We partnered with the largest cannabis clinic in New York and most probably the country It's up in Buffalo, New York run by dr. Laszlo Metzler Dr. Metzler is a very well-known national neurologist. It's a very large neurological practice The cannabis clinic has been operation for four years 9,000 patients He was a he was a cannabis skeptic going in and now he is looking at the amazing results that he sees only on the Medical cannabis side and so we've always felt as a company that this is not just to service the traditional users of cannabis It's also to bring in the millions and millions of people that have abandoned this product one because of stereotype You know, it's a it's a great gateway drug, which is my generation. It is absolutely. Oh, no So that's how many of you know people over the age of 50 or 55. That's how they grew up They had a bad experience in college and so dosing The way you can invite it I think there's an massive amount of education that we can get people comfortable that going into dispensaries Not a naughty thing to do that it should be a natural thing to do a safe thing to do that There are products available in our dispensaries, which can help you with many different aspects I look at myself as an example in three years ago I was an active user of ambient in when I traveled I have a tough time sleeping I have found a much better cocktail of cannabinoids that are far more efficient and you know, I don't need to have that that hang over the next day from Those pharmaceuticals and that was an education process for someone who was buying, you know a multi-state business, so I feel deeply that there is a great combination between what we're doing in a place like Pennsylvania Which is very medical orientated but bringing that into the traditional adult use markets to allow my patients You know young maybe not younger people but people in their middle age older people woman people who have not traditionally Walked into a dispensary for for for a lifestyle choice so That's really interesting the the concept of bias or stereotype where you know It's one thing for for me to make terrible jokes about New Yorkers always dressing in black But you know for cannabis patients for cannabis consumers. There really is There's a stigma that you have to erode What do you think and either of you should please just feel welcome to answer this but um How do you think that? Beyond hello and jushi. I mean we've we've spoken at length blight of about the pharmacists on staff What are some other steps that you think the company itself takes but also that the industry should be aware of to erode this stereotype or of a gateway drug or you know, I mean ultimately it's it comes down to education and Having honest Conversations about cannabis and creating a space where anybody can feel comfortable coming in and asking questions Even if they don't want to purchase something if they want to just come in and find out a little bit more about it I could come in and just will this get me high and It's a terrible question, but then you you guys would explain Well, there there'll be effects, but these are the effects and I think there's there's just so much to parse through There are there is and Pennsylvania right now really is restricted on who can even come in the doors to ask questions But we've really made a conscious effort of going out to The community and talking to medical professionals And making ourselves available to somebody who maybe hasn't considered consuming to ask those questions So I know my mom for instance She Would never have stepped foot in a dispensary or consumed cannabis to her it was wrong And unfortunately she passed before she could step foot in a dispensary, but I genuinely believe if she had today We could change her mind and make her more comfortable with cannabis as an option for anxiety chronic pain as a sleep aid To assist with your appetite nausea and other So I really think that's what's so important and We have such an opportunity now to start really talking to people who typically wouldn't consume cannabis About how it is safe and how you can consume it responsibly and how you can feel good About making that personal health choice for yourself Eric you have you mentioned at the top that you have kind of an interesting perspective with your Your decades of work in the finance industry What do you what do you see from your perspective now in charge of I mean We're all in cannabis, but you guys also are in cpg to an extent. Um, what do you think? Where do you see this going? Um I'm not going to say where I see it going. I just Tell you a little bit about how I I see the industry and how we are involving as a company You know, I've always said this that you know, this is going to be a 200 billion dollar plus industry just in the united states It's already according to certain statistics a 40 to 50 billion dollar Illegal market and so really what am I required to do as a as a business person as an operator of dispensaries? I need to create a safe clean Informative environment in which you can go into one I need to have product that is tested with a high degree Of authenticity on where it came from So, you know, I think people have consumed cannabis for a very long time without an ability to look at the label and on that label identify All of the aspects within that product that they are consuming Now that's the second thing I need to do the the third thing I need to do is I need to comply by By state and hopefully at some stage federal law And operate a clean safe tested Compliant company if I can just do those three things I can build myself an incredible retail Manufacturing processing extraction and cultivation business that can serve the community And I think that that community is going to evolve very quickly into looking at this as a Part of their national net their daily wellness regime And so that's really how we look at it. And that's how we are building the company That's how we're going to be building our brand And you know, it's it is for me a relatively easy thing to do if we just do it right Yeah, I I agree with that. I think what's really interesting with what you're talking about Eric is that You know for a lot of our audience for ourselves on stage We all to a degree one or another degree understand the intricacy of Compliance of licensure Of testing but for patients or for consumers That's all background noise and so many of them don't necessarily understand that they just don't have the awareness of it blithe What do you think from an education standpoint because I know you guys Do a wonderful job of hiring so many people from very diverse backgrounds Not only in terms of what you provide with the pharmacists on staff, but also in terms of hiring minorities hiring women Um From an education standpoint, where do you think that plays into it? Well first off just to kind of discuss what what you mentioned about Our staffing something that we've really found to be important is Ensuring that the team we have in the stores represent the demographic with which they serve So incredibly important that we are having a diverse team Um, and that way they can connect directly with that patient It doesn't seem unnatural or out of sorts for a patient to come in And you know see or find somebody working in our shops that they feel that they can instantly connect with and have a conversation with And relate to so that's a big piece And then you also discussed, you know women Interestingly, um I myself am a woman and my marketing manager In pennsylvania is a woman my practitioner outreach lead is a woman My two regional managers who oversee all operations of our facilities in pennsylvania are women 60 of our pharmacists and medical pros on staff are women And that's not necessarily a strategy of ours. However We do see that right now the majority of cannabis consumers Are are men, but we're seeing more and more women Come into our shops. And so I think it's it's really nice to to be representative of the population and Know that there's also just a nice bedside manner that our our medical pros have and they can come and and have a very Organic conversation with with the people who are are in our stores. So It's been interesting to see the evolution. Uh, it's been very natural and organic But incredibly important and it makes me proud to see. Yeah, it should. I mean, that's a big deal Yeah, right guys, give it up. Come on Uh, blithe I do have a question. Um You've done two cycles in two separate states now, right arizona and pennsylvania For jushi as well as for but beyond hello What are some of the hurtles that the companies themselves had have had to work through in terms of maintaining A consistency of brand in different markets. We were talking backstage about how In pennsylvania, there's certain stuff you can and cannot have on shelves So some similarities. I mean it's it's I've worked in medical Markets so arizona was medical pennsylvania medical. So very highly regulated industries Incredibly important that you operate Compliantly and that you are developing strong relationships with the regulators understanding what they want And providing what they want Lots of times people discuss operating in a gray area and that has never been What we what we do for us It is very you know by the book And maintaining compliance at all times. So those have definitely been some similarities The purchasing trends Have been incredibly similar Your new to cannabis consumer is typically more comfortable with a tincture or A topical lotion Where your more experienced consumers can Have hard concentrates or flour or oil cartridges So it's been very very similar. Obviously they have their own unique facets, but overall very similar The big difference that i've seen between arizona and pennsylvania are the products that are allowed in the program Pennsylvania currently does not allow edibles, which I think is incredibly unfortunate I second this And what's interesting too in pennsylvania is A patient can purchase product and go home and make their own edibles And that's perfectly fine, but they cannot purchase edibles in the dispensary So that's been a big difference the product availability But I think it's I think pennsylvania will eventually have edibles I think they'll see the the value in it if they haven't already identified that and it's with any new medical market It evolves and it grows and you learn with the state And make changes together All right. Thank you Erica's medical markets do continue to evolve as well as expand I know that for jushi and beyond hello both brands are very focused To one degree or another they're focused on mna As a means of expansion, uh, would you care to to chime in on anything from that standpoint in terms of What it's what it's like just working behind the scenes to expand into new territories and to recognize What makes sense or versus what doesn't make sense? Yeah, um Look, you know, I I will say this, you know having had a 25 year Um career in finance having you know bought and sold billions and billions of dollars of companies It's it's it's probably more challenging than I ever thought it would be Oh, that's interesting mna is not easy. Well, you know, if again The the the thesis and why we came out of retirement to start this company Was we felt that there was a dearth Of well managed highly compliant companies that over time if you built that company Over the next three to seven years and you were able to have Best in class fortune 500 financials compliance structures Team training dispensary management how you did extraction and processing packaging High quality cultivation if you were able to build that That that would be a differentiated product over time And if you look at the mna scene, you know, there are a lot of people that got into this business for very many reasons Many people were underfunded and so you often come across businesses that have just not been run The way you would be able to if you were to be scrutinized by a kpmg or by a a compliant business And so mna is incredibly taxing.  That's great if it's operational You need to make sure it's audited because I can assure you it hasn't been audited and I'm a public company Number two, you need to make sure that when you do your inventory analysis that the inventory in and the inventory out Is consistent because if it isn't you have an issue And you have to make sure that the legal structure in which it was procured either through a competitive Application process or another mna process that you have diligence that that there's nothing in that Process that may come back to haunt you over time where there may have been payments made There may be other people on that application that were not appropriate And so the amount of of of really detailed diligence required to do if that's the company you want to build Is is actually is is one thing that we really underestimated And so, you know, it's it's hard, but you know, we will continue to add to the portfolio over time They're I think the there are many good operators I think there are many people that believe and and and and value the story we bring I think they value that we have people like like blithe running an amazing business And yet they can rely on our financial skills to raise capital a very large legal staff It's it's it's a complicated business. It's okay. It's even more difficult to do it well Absolutely and folks, I mean what eric is talking about and this is me putting on my I worked for a cannabis consultancy hat for a moment He's touching the tip of the iceberg We could have a completely separate panel solely On compliance regarding Mergers and acquisitions within the cannabis industry.  None of you learned this the hard way But what eric's talking about is 100 true Anyway, you know, I would just say this I don't want to you know push sushi too hard One of the very big fundamental differences between us as in the business and many of the other multistate operators Is as as a management team An enormous amount of the capital is our own personal capital That's interesting. We thought that was really important that we align ourselves guys have some skin in the game We know we have a lot of skin in the game And so, you know, as opposed to gifting ourselves 50 percent of the company We we are we are deeply deeply invested in it And it comes a little bit from the hedge fund background that we come from the most successful hedge funds over time Have been hedge funds where the principles are a very large portion of the underlying capital Because you just behave differently when it's your money and when it is other people's money And so, you know, every time I go into an m&a situation I am putting my money and because you all know this Most of us are funded by private capital And that private capital has traditionally been people that jim the ceo and i'm the president And the board know personally and these are people often who did not know much about cannabis But have relied on us as successful business people to say look that sounds like a really interesting endeavor And so, you know, we have a very high Degree of personal responsibility to the underlying shareholders. This is not something where we went public and raised a ton of money This is people. I know who I've worked with these are family officers So, you know and in that isn't also an issue because one of the issues I have with cannabis is it is Unfortunately being funded by wealthy people And it's not really an ability for the general public yet to participate in this because it's so damn difficult to invest in cannabis It's it's exceedingly expensive I I know that in california. There are a lot of reasons why it's expensive And you know, I was at a talk last week where one of the panelists explained Not all of us are going to be owners And that's something to bear in mind, but at the same time it doesn't have to be That cost prohibitive Anyways, we we could have another panel. We'll have another panel afterwards. Just talk to us in the lobby It'll be an impromptu panel panel is too strong of a word. I'm digressing at this point Blight I do have a question for you though Circling back for a moment Eric mentioned dosing and how correct and how critical correct dosing is and that, you know, particularly for New patients or new consumers who are just getting into it, you know, be it a baby boomer someone in their 60s who You know had one bad experience 40 years ago in college or someone who's, you know, never tried it, whatever Can you talk to us inform us? What's it like from a retail experience for anyone going into a beyond to low or any or the experience that anyone should have At any store, what's it like walking someone through a dosing? Criteria or selection sure So consistent with our brand and going beyond a hello and a simple transaction, you know Those are conversations we really want to have And we do understand that dependent on the patient they may or may not want to discuss it and that's that's fine but if they want to and If we're offered able to offer our guidance, I mean, it's something that we do all the time. So If somebody's not asking a direct question It's incumbent upon us to make sure that we're still informing that person purchasing how to use the product appropriately So dosing You've got to know how to properly use your product and it's important to understand what type of Experience you're looking to have or what type of effects you are looking for and for us We really want to make sure that we're titrating doses up So we will always encourage that I'm sure most people have heard this start low and slow And it's true because you might come in and tell one of our our employees, you know Oh, yeah, you know, I consume all the time or I've had this I've had that and that's wonderful And we respect it and so we'll make sure that we get something that works for you But to be responsible, you know, we're going to suggest that this is the proper dose to start with and then you titrate up Slowly to find that sweet spot that works best for you We really recognize too that It takes really Unfortunately one time for somebody to have a bad experience and they will forever be turned off towards cannabis And eric mentioned it earlier, you know, you've got a bad experience in college And so you're going to stay away from it. So we want to offer up that information and help the consumer have The experience that ultimately they're looking for so Talking to the patient or the consumer about what they're looking for and knowing the products really well I mean this this oh You know, I I put I'll take a slightly different angle, you know being Being, you know, a founder and a manager of the company. What are the scary things that go bang at night that you worry about? You know, and I I make a parallel between our industry and the electric car industry Um, and let's even talk about self driving And so you have a self driving incident that happens and a person unfortunately dies And all the non-believers which are the car manufacturers of combustion engines the skeptics out there Jump on this like oh, yeah, you know never have self driving. That's that's So ours are going to take my jobs. That's just all that and so we live in an industry Which is new and nascent. It's developing It's got tremendous Capabilities for people to add it into their wellness regime But there are a lot of skeptics the tobacco companies are terrified of us The alcohol companies have to be terrified of us and the conservative non-users of Of of cannabis who believe this is a drug one I'm not particularly fond of us either pharmaceutical companies is endless. So it is absolutely critical That we manufacture highly curated products That has a chain of custody that we can defend That has no additives in it. They're going to create Deaths by vaping and that we teach people how to How to dose themselves? I have a friend of mine who's in the audience who when we opened up stores in In in in colorado for the first time a reporter walked in bought 100 milligram edible Was told not to eat at all ate at all had a terrible experience and wrote online and that polluted I'm sorry. Is your friend a rhinoceros? I mean 100 milligrams is a lot I mean if you don't know I always make this this this this analogy It's it's it's quite amazing to me is no one would walk in and someone pour a clear liquid into an entire glass And you would just drink it you would ask what is it if it's tequila you drink less than more So I think for us from a business perspective This is a terrifying aspect that we need to make sure we do this right because there are so many People that would like to see us fail. Absolutely. And I mean folks some of this might sound remedial, but you know Cannabis is having its moment. It's having a prolonged moment But because we're having a moment it means the spotlight is on us and not just because We're all literally on a spotlight because we're on a stage, but because literally, you know Everyone is looking at us and so from a scrutiny standpoint What eric and blight they're talking about in terms of maintaining the tightest ship Behind the scenes in front of house Everywhere these are big big lessons that we all understand the critical importance of not just for an individual company But for the industry we're all ambassadors for the industry Um moving to a slightly sunnier topic I I really want both of your perspectives on this because I know that you know There are a lot of people out there who are probably wondering You know, if they're a smaller company if they're a local company What what are some steps? What are some takeaways from the The journey that beyond hello is seen from the journey that jushi has seen Um to becoming a larger company to becoming a national company if somebody wants to go national if you want to if you want to grow um ultimately believing in your brand and Making sure that everybody from The bottom up believe in the brand is incredibly important. You have to have that consistency So we obviously want to have consistency from store to store, but even at a more granular granular level People in the store there has to be that level of consistency You have to make sure that you are training your staff that they know the product that they understand what the missions and goals are and They'll carry that through so even if you are a a small Local singular store there's still such an opportunity because If it's a believable brand and everybody in the operation are sticking to that that singular mission It'll resonate and you will find that that population that you can connect with And and it'll allow you to to expand and and really get into A larger market with a larger demographic and and have a loyal following. It's so ingrained I feel that with beyond hello and with jushia. It's so ingrained into the company culture that Customer experience comes number one. It's such a priority for for you guys whether it's patients in pennsylvania Whether it's an adult use consumer in los vegas um Can either of you speak to that and sort of how you maintain that consistency and that dedication On a store on a per store basis Yeah, I'm not going to talk about it on just a per store basis I'm just going to talk about it as a country a company in general I'd say the most remarkable thing in the last three years is the the the quality of Of person wanting to join the company and so I'll use an example. I would never believe three years ago that a You know a a Harvard MBA would delay Harvard for two years to come work at jushi Whose mother was very disappointed that he was working in a cannabis company and whose father was mildly Supportive, but I just think you know I look at the quality of people that we can hire The diversity of people we can hire and the passion that those people have for the industry Is to me is is really the sea change and if that continues to be the case I think that's a real winning strategy because you need a great team on the field And to have people like blithe who who can operate with this degree of integrity In this business really makes me feel that you know when I look at my my team that we're building I'm astounded by the quality of people the passion that the people have for the industry And you know the people I'm partnering with I mean it's just amazing And if we can keep doing that and we can keep getting this many really talented smart creative ethical people Into the business that to me is the winning strategy Thank you guys folks we're going to end our formal panel But we're going to stay on stage because we're sure you have some questions We're going to open things up for a little thing we call q&a Do we have microphones and Well, it's a small peter if you have a question. Please just stand up and start shouting Just kidding. Please raise your hand Oh, please go ahead Sure, so for us we've seen the value in maintaining That one-on-one relationship and rapport that you build with with a customer and a consumer and we understand that When you transition into an adult use market You might see just more and more people and how do you keep up with maintaining those relationships and ultimately It just has to remain in the forefront and as a focus for the company we are Very medically oriented at the core and I hope that that's something we we never lose because we recognize There's always a place for that and and it is so important. So Ultimately our part of our mission and part of our brand will be to do to maintain that and have individual conversations with consumers and Provide an opportunity. Maybe if it's not right then in there, but for a follow-up question Or consultation or conversation It just has to be part of the plan You know, I'd say it's it's it's going to be a a A decision that we're going to need to make as a company to incur the higher costs of having potentially a better informed Staff More staff on site and that decision is is that long-term accretive to your value or short-term accretive to your value? I think we'll continue to think that the long-term accretion is more important than the short-term Bump that you have on not wanting to spend the money To have those types of professionals in your organization, especially at the retail level Eric my name is Bob Lewis I had the fortune of speaking to Jim your partner about six months ago One of the questions I have is every conference. I go to the discussion comes up about consumer education And I stand ready to say Can you See a solution where there's a public-facing communication strategy that the industry can back that you know would allow Messaging to be shared with consumers across the board Because I absolutely think that's the one missing piece Is a PSA strategy an activation of all the cannabis industry together supporting Sort of like a nonprofit almost, you know acting as a voice for the industry Is that something you could see being beneficial to all? Absolutely Yeah, and something that we're actively doing now too is From state to state engaging the various medical pros that we have in our organization And really increasing the communication so they can have that knowledge share And develop a platform so that information is more readily available to the public You know when I speak to dr. Laszlo matchla One of the things that he keeps saying is Cannabis has left the medical percent professionals behind That partly because the medical community really hasn't embraced cannabis And so I think it's a mixture of not just having that type of non non-profit But I think we also need to get the medical community To start to back what cannabinoids in general can can do and how they can be part of your wellness regime And I think that's going to take a long time And I see the the uphill battle that dr. Matchla has because he is out there in the forefront publishing on cannabis Publishing on on on disease states that have had a really positive results And it's it's still a very skeptical medical audience that he's talking to Any more questions we have one more okay hold on Following up on the medical aspect Blythe this question is for you. What is the criteria for your medical professional staffing? I mean, do they have any formal cannabis training which is pretty much non-existent at the academic level? sure so in pennsylvania specifically the medical pros who Work in facilities have to go through a CME course specifically geared towards cannabis So it is required with the department of health Also in order to work in a dispensary whether you're a medical professional or not Even for us to be affiliated with an organization. We have to go through a three-hour training course that the department of health in the state has created to make sure that we understand not only how to operate but we know the The basics of of medicine and how cannabis is medicine and then beyond that We think it's incredibly important that any of our medical pros also go through an in-house training that we've developed So we're really looking for medical pros who are incredibly passionate about it I know one of ours for example We'll always share a story about how she was working in a pharmacy and people would come in and ask questions And she was starting to become so involved in cannabis just through her own self study That in her mind people would ask her questions and she knew she was supposed to respond about you know the pharmaceutical drug But she was talking about or in her mind having a dialogue about which cannabis products would really benefit this patient And so for her that was When she finally just had to you know Make the transition into the medical cannabis space. So Yeah, I mean it's it's a great question. There is training That's required and courses that are required in pennsylvania, but internally We require it as well because they really are I mean their role is so important. They're talking about the different Contraindications you can have with with your meds that you're currently taking or how you can Get off meds that you're currently taking and use cannabis as an alternative. So really important Debra, do we have any more time or Really? Oh one one quick one one more quick one folks Hi, um, I'm wondering if you are collecting any data from consumer transactions and interactions And how are you using that to both educate consumers and as well as educate your your staff? um, so we do have restrictions placed on us with the department of health on what type of information we can actually collect from patients and Utilize but ultimately We are constantly looking at what conditions people are coming in and being treated for We have we've developed something similar to a soap note in the medical industry that we refer to as the hemp note So we're able to go through with the patient and understand their current health what drugs they're currently taking what ailments they're looking to alleviate and what type of end result they're looking for so We we have those hemp notes and we're reviewing them with our medical pros on a regular basis to really have an understanding of of what products are working and for what conditions and then We always we like to geek out in the stores And talk about what we've learned from our patients or from our own personal use and so those hemp notes are really um Really useful because we can look back at just internally what what we've treated various patients with and it helps us As a whole when we've got a new patient coming in And knowing what to recommend and then as I touched on earlier too We really are increasing that knowledge share that we do across the state lines and working with dr. Metschler and dent and learning from him and what he's experienced and our medical pros Visiting him as well and just increasing communication and talking about it Yeah, I would I would argue that we have one of the most formidable databases on medical outcomes related to cannabinoids used on various disease states Now there are many restrictions around what we can and cannot do with that But we are continually looking at that Doing doing studies on it and we think that that is going to be an incredibly valuable part Of our our our business model going forward in in using that but the the restrictions around it are Immense and difficult and it's a whole separate discussion But you know, we are very focused on trying to become smarter and better at Creating our products that can really help our patients Uh ladies and gentlemen, we can't thank you enough for being such a fantastic audience Please give it up for our panelists Eric and Blythe And give it up one more time for debora and green market summit. This has been a wonderful experience. Thank you We actually have a panel at one o'clock that's sponsored by a kerna talking about data and brands so Right after lunch we'll be hitting on a lot of that with the data that they've been able to Get from you know, seed to sale tracking and such and it's pretty pretty fascinating What they're starting to do with that information


Day 12 Let's see if we can get the random access stuff done, but first You'll notice the text is smaller. That's because I finally figured out how to make the BBC master Emulator work which has extra memory to put the video memory in which means you can use 80 column mode without Using up most of the RAM. So if I start it up and do free We have loads more space. I mean it's still Not brilliant, but it loads more I Also did a whole bunch of fixes to stats stat now works so we can Get a disk summary which shows how much disk space you've used we can get more detailed information and these numbers are now correct It's 256 records per directory entry rather than the normal 128 because we're using a 2k block size Which now I look at it should actually be listed here somewhere Hmm. Yeah, I caught stole all this from the original PLM version we can Get a summary of the User locations, this will show you if you have files on users other than the current one Which is useful, but the most common thing is this Which shows you information about the files in particular How many records are in the file? This is the length of the file How many bytes are used in the file? This shows you the number of blocks of disk space and because these files are spars This means that these two numbers are not necessarily related You can see that because we're using a 2k block size Nearly all these files use a single block This one uses for because that is huge 53 records Submit is smaller using two blocks and dat down here uses no blocks This shows the number of extents all these files are one and the access mode whether it's what various access flags are and We're gonna have to do that one as well, but let's tackle read write read write random access first So over here. I made this little C program this opens a file and It attempts to write random junk to a record well to record 80 Which because there are 128 records per extent this should be halfway through the first record Right random just seeks to this record position There are 64k records in a file giving you a total of eight megabytes per file and If I run it And that It says unimplemented So let's kill this off and go find the BDoS code Okay, right random So this is actually going to be You see read sequential Right sequential Right to a random record So this is actually going to be similar code to this So we are going to common sum of this out So where did I put read here we go? So this Gets the block value reads it Okay, so we're going to Wait, this moves the FCB on to the next block. I Don't really want That in here. Yeah, that's that's I'm getting distracted by read. Let's look at right So a lot of this code is fairly common So for right sequential we want this stuff We want this stuff and all the rest is common Sorry this stuff and the rest is common. So right sector down here. This is trivial This is This can be commoned out. So we can have Hmm, I think there should be some error reporting here Actually, and this will This will set the sector number here to the appropriate sector for the block in the current FCB And in fact, we can put this down here No, we don't we want to do this before we modify the these fields seats to the block Ah So it's the current sector to the block pointed to by the FCB Okay, so let's take this code and shunt it down here. So right Random so we convert the FCB we now want to Take at the record number in the our parameter and convert this into The the module extent current record parameters so Convert Random access record number to module extent record and Okay, so the record number is simply going to be well It's a value from zero to one to seven Offsetting into the current extent. So this is just going to be FCB Zero Y that reads the bottom byte of the record number and It current record store The extent number is going to be the next five bytes so that is the top byte of the bottom so the top bit of the bottom byte and Then the next four so so And we can't modify the value Because that has to stay as is so We are going to Rotate the bottom bit left we get the high byte We are then going to rotate its left carry into bottom bit and It with the extent Mask and right Okay, and now for the top we just want to Rotate right to get rid of the top The bottom four bits because those were part of the extent number This gives us the module number so LSA four times CB This goes into s2 Ever you could just write but we only want to do this if the We don't want to disturb the The bit in here that controls whether the FCB is modified or not Let me just have a look at right sequential and see what that's doing read sequential Right sequential so that's here Close extent and move to the next one So this is not Quite hang on second. How does this work? Oh? Yeah, move to the next one, but doesn't open it Okay, so the flag is irrelevant because we've just closed the file In fact, we know that because we've closed the file the flag is not set So we don't need this In fact, we know the flag is set. Sorry. It's when the flag is set. It means it's not modified So we do need that okay, so Yeah, okay, so in right random so stash in a And we can't do arithmetic on any of the index registers so we can stash it in X But then we can't do anything with it But we don't need to Okay, roll a put Not modified fit into carry if carry is set then Or or in eight zero I Do not think So there are I think L s are So we need to get the carry into the top bit. I'm just wondering if there's a better way to do it I was thinking that maybe I could shift the value left by one Discarding the top bit then I could rotate it right by one to get the carry in but no the shift left does Put the value in carry So what's the difference between a oh ASL and roll are different Because with roll the carry goes in the bottom. So I think that's as good as we're going to get okay so We have now updated the FCB But we shouldn't have done that yet Because we would need to close the old FCB So actually rather than writing this stuff directly into the FCB We are going to Dash these intents so that now we are going to See whether things have changed So starting with the module we are going to then we check the extent Byte so if we get here then we know that We do not have to switch Extents Let's do it like this. So the Z if if the module number is Hmm now let's do it like this so if the Values are different then we want to Close the current extent then we're going to update the FCB now it's safe and We do not care about the not modified bit at this point No, we do care about the not modified bit because you need to preserve the not modified bit for the case when we Do not need to switch FCB's So then here we want to Open or create the file Sorry open or create the new dear end so Oh, yeah, it also occurs to me that we can actually Write the current record back We don't need to stash this as we can this isn't relevant to the Which extent we're using so okay, if the module number Has not changed Then compare the extents if either of them has changed Then we follow this code path that this which changes us to a new Extent So now We can Seek to the appropriate Block at what point do we create a block here? So we should just be able to Do this so we seek to the appropriate block actually we can put this here and We want to load the current record Here The current record of course is set up there So this will update the record count of the FCB then we seek and Right, so let me just take one more look at right sequential Yes We can't put seek to block down here because seek to block is going to use the current record to figure out where to go to Okay, I think That is code so Rand that Okay, it did a thing and returned Zero However, nothing happened because my test program has not closed the file Incidentally one cool thing about CPM is that because all the data about open files is stored and managed by the application You can have as many open files as you have memory for there are no file handles There are no Kernel side resources to need allocating. In fact the kernel doesn't allocate anything. It's got no Dynamic memory storage at all it only ever has one thing of each type Which is quite cool Okay Rand that Get a zero we get a dat file Oh, oh So 80 records Because we've written to record 80 Should that be 81 and We have allocated a single Block and I was kind of expecting there to be another F Here, let me just remove that Okay, that was working so rand that if we dump it we get nothing because Unallocated blocks aren't readable in CPM Unlike Unix where they read zeros and allocated blocks are treated as end of file Okay, so here is our dat file and Here is our allocated blocks. You see these are all spars So that's zero one two three four block five and here is our 80 bytes of junk at the beginning of block 80 You know what I'm going to just change that to zero. I'm wondering if I've got an off-by-one error in the Block numbering, okay And that Dump that. Oh, I think we do you know Because you see we have written to the burst block Hmm. You see You see the record count needs to be One more than the current record. This is right sequential We have incremented current record here so The same code here needs to be the same and that dump that Right, we have one record like so if I do if I then change this to Two and that That that we have written Yes to the third record because it's zero based So we see that we still have allocated the first block But if we go down here This is the beginning of block F so that zero one Two So that has written to the right record If we write to block 80 as before and that that that 81 records one block So still is block F Here is the data Right, let's now try and write to record a hundred and fifty. That's above a hundred and twenty eight Therefore it will be in another extent Okay, so we still have a dat file Well, that's wrong. It should have created another extent, but it hasn't let's take a look at the file system Yeah What it's done, I bet is That it's just ignored the fact that this is a new extent probably my maths are wrong So this is this we Mean it looks okay so we copy temp plus one into param we copy temp plus two into into Extend field we copy temp plus two into s2 with not modified bitset Oh, you don't want to do that We don't want to do that because we open file here will set it for us We only care about that bit when doing the comparison in fact in fact We are going to ignore the not modified bit here because if we write it If we do need to change extents Then we update it while the fcp is closed and therefore we don't care about the bit If we don't need to change extents. We're not updating it. The only place we do care is When doing the comparison so not there here Like so So if they are equal Then we test for quality here if they're not equal We go through this Okay, and that stat that Okay, that's still not worked. Let's hit the debugger. I Actually fire filed a bug report for the feature request with The emulator I'm using for an easier way to enter the debugger and they have actually done it in a branch It's just I haven't got round to checking it out and building it yet So I'm still doing it the old way and that Hangs debug break one three six delete that Reset continue and that okay convert user FCB We are now converting the random access record number so Our FCB is at one a1d Which is here, so this is the current record This is these two bytes are the random access Pointer there is actually a third byte as part of the random access pointer, but only one function ever uses it So at this point we're ignoring it So nine zero zero nine six, okay, so fetch it fetch the low byte 96 This gives us the current record of 116, okay, and right back so that's put one six here We next fetch the low byte again 96 Rotate left to put the top bit Which is set into the carry there you go carry is set Get the high byte which is zero Shift left gives us a one and with 1f that gives us the extent number which is one and Stash Okay Now we fetch the R1 Which is the top byte that's a zero Shift off to get the top four bits still zero. Why am I putting a in X here? I think I had a plan Okay, so that should be ignored Put it in the s2 Put it we don't want to write that back Okay, anyway we Stash That was changing it changing s2, which is That one From zero to zero Wait, we don't want that either We just want to store it and we don't want that But we do want that Okay, so we now do the comparison We do want this but why is pointing at the right thing so Compare it It's zero because we just overwrote it by mistake But it was zero to start with and with 7f and compare They are equal So we go here Load the extent which is zero compare with what's in 11, which is one because we want to change extent They are not equal So close the file Well close the DRN done These are using temp. That's what the problem is Great, so we actually want to lda10 plus 2 pha Push s2 Ex this is going to be just to go here This wants to go here Okay, we haven't done any error checking from internal close files if that fails then all kinds of bad stuff happened I'm going to need to overhaul how errors work Still one extent. I Didn't save this Okay And that stat dat Still not working great. I Shouldn't have quit this because now I don't know where my breakpoint was One three six Okay, let's try this again We know this stuff will works so convert user FCB update the current record field Calculate the new extent number Which is one and put it in temp one Calculate the high byte Which is zero Put into temp two now compare s2 We see they are equal So now we compare EX and we see they are different So we push them first EX Then s2 Then we close the file So now we update s2 now we update EX Which is one So here we can see the new FCB With a one here in the extent field So we try to open it Carrie is clear It thinks it successfully opened the file. I'm Surprised We do want to match all the bytes including s2 so Here's temp That is param dph Directory buffer so this contains the DRN that is just found Which is this one That does not match so We should be here EX s1 unused s2 Okay, let's try this again You see one extent round that convert Go through the maths. Do we need to switch for a different extent? We know that we do Okay, we close the file Hang on our extent is We haven't updated the extent yet, so that's fine. So we now update the extent Now we call open file here Okay, so we call find first here A is f the number of bytes we want to match So a Read directory entry check pause No more files We do want to do the fast check. This isn't one In fact, we're going to want to go through this four times we reach the relevant We want to go through four records so I just wonder how I can speed this up a bit So here is where it is comparing extents So let's put a breakpoint at one four F three Okay We're here. We're now trying to compare Extents. So if I look at four One a1d we see we are looking for extent one so Things we have successfully read sequential files of more than one extent this should work We get the extent mask inverted I Think we only tested multiple extent files with the small file system. So I bet this stuff is wrong so for the big file system There can be two extents per directory entry So what we do is we mask off the bottom bit, okay, okay, this is working We're wanting Yep, so we are correctly opening the file What this is doing is it masks off the bottom bit of the extent? Because extents zero and one are both in the same dear end wait a Minute wait a minute there are 8 2k yeah game there are 8 2k blocks per dear end a 2k block contains four records There are 128 records per extent so 16 by 2k is 32k of data Per dear end which is two extents each of which are Hmm now hang on 8 by 2 2k blocks 8 values 16k per Dear end this should be one extent this value here is wrong We get the extent mask from the value in the bios Which we get from here So blocks on disk is less than 256. Have I got this completely wrong? Are we using 2k blocks or not? Have I managed to get myself very muddled? three four five six seven eight nine a we are using a small disk and with one byte per block so there are 16 Byte here Therefore two extents right that is correct. We are we it is actually doing the right thing okay So it's we're trying to extend the dear the dear end for that from one extent That to two extents to do that What we do is we bump the extent number from zero to one Thus indicating that this dear end represents the second extent of the file That's the top half here It's assumed that the bottom half is going to be full It's just you you always put the extent number of the maximum extent so We do want to find extent zero and We do want to as However, we do want to update the version in the FCB with see if you open Extent zero Seek to extent one then seek to extend zero and close the file The the value in the FCB represents the extent you're currently looking at So when you close the file the extent will be zero even though the file is longer than one extent its file is two extents So that will in fact Corrupt the disk This will write back a zero where there should be a one I don't think that's relevant for what you're doing here what we're doing here But this merge FCB into dear end code needs to take care not to make the Extent value smaller. I think Anyway, I don't that's I'm look at that next. I don't think that's relevant here So we are Still trying to open our file. We expect this to work We are comparing the extents down here. So we mask the FCB extent to do the comparison. See that's turned into zero So we Door it. Why am I not using the X registers X being used by something? I don't think it is It's not. Oh Because we need to subtract it here and we can't do that with X. Okay so stash Pull the mask apply the mask again to the one in the dear end Which is also zero do the comparison. Are they equal? Yes, they are and Go around again because we want to compare First s1 which we ignore Go around again now we compare s2 which is zero But that's just a bite. So we compare it Yeah, we pull the top bit We reach the end. This was a success. We found a file and we return back to Open file not that one That one so we do have a matching extent so we are going to We're going to just finish through this code. You know this works. I am however Going to step through this stuff So that's here here This is the fourth first time we've actually exercised this code. Okay So we are loading the extent in the fcb In the deer ant sorry because we've copied the deer ant into the fcb and The the extent value there is zero that tells us that the file is one extent long Well, the deer ant is one extent long. We then compare this with the value the user asked for which is one No Zed because they're different so We fall into this code Now we should be hitting this condition Indicating that we are now looking after the end of the file so Don't set That okay record count Get updated Update the extent value with one the value the user first thought of so our open fcb looks like this We have extent one record count zero and The allocation map for extent one is here Nothing is allocated okay, so That's done. We now go to Write random We have just opened the file Harry is clear that worked So we skip on to here make we make sure that The record count is Is updated Because the current record Is updated with respect to the current record so Current record is one six So we are updating the fcb With the new current record value, which is going to be one seven And we mark the fcb as being modified. Okay So there we go We've extended the fcb. We now want to Seek to the relevant block and allocate a new one. I Think this will work because this stuff does work so let's just do a next and We should be able to see in the fcb That we have in fact not Allocated a block so that does not work So we want to stop at one for 50 and go again Okay, we're here. We Get the fcb block value So Fetch as the current block number In the fcb in xa So get block index is going to be doing work Which is here when you look at the current record Okay, okay, this is not Updating it for multiple extents All right, so we actually want to We're going to want to fetch the extent mask again is this code Get fcb block index. So this is the Actually, I think we're doing this wrong Okay, so this tells us whether we are on extents zero or one Or more for larger block sizes So we now need to figure out how much to offset the Index so we need the value of the number of blocks per Extent So this is for converting from records to blocks and vice versa We know that a block Sorry an extent is always 16k So we should be able to figure out How many record how many blocks per extent By taking two to the 16 not 16 and Subtracting block shift here. Yeah, you see this is turning records Into blocks so But block block shift is not actually Right, this is more complicated than it looks No, let's take a look at the documentation again By us functions cell disk dph Dpb right block shift so Three is one k Yes, so this is you are 128 bytes Shifted left three Gives one k so 16 k is Going to be another four so that's seven so sir Seven minus three Gives five hang on five is 4k eight is 8k Nine is 16k so five is 4k six is 8k seven is 16k so Seven minus three is four one two three four Okay, seven minus three there is a shift Okay, so Okay, so we're getting four Here so we go through the loop four times we shift one left four bits Which goes to two to four to eight to six Dean Which is the wrong number? We wanted to get eight in fact we wanted to get four because we're looking for The number of indexes the num the index of The relevant bit of the allocation map This is the kind of math stuff. I am very bad at can you tell? Okay, so there are four oh wait a minute wait a minute. That's not a shift. This is an index seven minus Three gives us the four we want if the if we're using 4k blocks rather than 2k blocks which we are then each extent is for a Wait if Sorry, I keep getting this wrong. This is a small disc Each of these is a bite.  Okay if we are using 4k blocks then a Each extent is four bites So for a 4k block the shift is four So four Five six seven is three not right So we want we write this down So if you're using 1k blocks then the shift the the index is zero for a 2k block It's a four for a 4k block For 2k block. It's an eight for a 4k block. It's a four For an 8k block. It's a two for a 16k block. It's a one You know what would be easier than doing a than doing maths Just using a lookup table however We might actually have some of these here already There's some better documentation for this I will go and find the better documentation Okay, here is the original digital research system alteration guide documentation and The one thing I really notice is That none of these tables actually corresponds to what we've got here So I am I was hoping that we'd be able to trivially Get this from one of these tables We probably could but honestly it's much more reliable For me to Simply simply this isn't simple So the block shift here is One of these values Okay, so if you start at four Which is Corresponds to 2k that gives us a table of eight four two one So to get the to get the shift value it Get block shift sec Sbc For Tax Lda start index table comma X So then we get the current record and we want to after we've done the shift We then want to add on this value No, we want to multiply this value by this of half and sake Okay, so this is actually How is the original code doing? Okay, read the next directory entry Not that one. This is Block shift Okay Compute disk map position for v-records to HL So in order to we want to multiply our extent by one of these 0 1 2 3 So in fact we can get this by 7 Minus the block shift Subtract the block shift this gives us the Appropriate amount that we need to shift left the extent number In order to turn the extent number which we have here stashed on the stack Into The index into the Allocation map So we don't need to look up table We just put this thing in X Then we are going to use a dex Count this many times now if the extent mask Hang on you want to Pull that stashed value from here in fact. We don't need to we can do this Now if our block shift is 3 then Because our block size is 1k We can only In order to get an extent we need to use all 16 bytes of the allocation map Therefore the index is always going to be zero so 7 minus 3 I got that just take a look at my table again back this stuff out. Okay, so here's our table So block shift minus 4 Gives us Yeah We want 7 minus the block shift So a block shift of 7 it gives us 0 1 2 3 4 so the extent mask here for 4 Is going to be Stent mask See later There's a table of extent masks. There should be one somewhere rather than having to understand what the actual values mean But I now occurs to me I have this in My bios lookup table here we go extent mask and extent mask of zero means that we are actually going to and The FCB's Extent value with zero which will produce zero so we're going to shift it for shift that zero four times So this will all work Okay, we then want to Figure out which block the actual index is on and add the two together So we are going to have to stash this here then We shift it according to whether we're a big disk or not Add on the allocation map. Yeah, and then get the thing right. I hope this works. This was a nightmare So Let's get rid of that brand that Stat that Still doesn't work. What is it actually written? Nothing useful however We now have our block allocated in what I think is the right place I say I think it's the right place because this is clearly block 8 And block 8 is actually being used over here As part of stat So that this should be block F. It's allocated block F, but it's written block 8 So that's wrong. I Wonder whether Using temp zero has confused things was in very easy way to test this which is use a different temp and we also want to Trigger it to regenerate the file system because the file system is invalid, okay Rand that Start that 23 records and yeah, that looks wrong So if Yeah That's changed to OF. I bet that if I did this again with for 10 plus zero that would be Back to O8 again So that's something that's using get FCB block index is Using temp zero Such as set FCB block here, okay? Well, I don't believe we're using block temp 2. So let's just put 2 and I think we can do better than this So we need a First and it's going to push a and x onto the stack, but I have to in order to push x I need a so I can do Transfer a to y to x to a push Y to a Push your PLA there Another PLA there does PLA set any flags Yes, it does So I can't do a PLA there or I will Upset this conditional, but I can put a PLA here So I don't need that anymore So that's a miserable piece of code with lots of register shuffling This would be trivial on the 65 co2 because as I have mentioned many times before I don't need that The 65 co2 lets you push x and y Anyway, not using temp there is useful Okay Okay, ran that Still only using one extent. That's because I haven't fixed clothes yet So here we have that We have a this block has been allocated in extent one, which is correct It hasn't updated the deer end to say there is one extent, which is why the value is not being reported correctly okay, so We fetch the directory entry for this extent check the FCB has actually changed Find the directory entry for the extent which is we got it here up date it now when My thing I think right, okay See I was worried about the user Trying to doing something like writing here and then seeking back to extent zero But without writing back the FCB changed the disk this value would be wrong But you're not allowed to seek back to extent zero from extent one without first Closing the file syncing it rather So the value in the FCB should be correct So all we need to do is This should be a why Okay, we generate because the file system is Suspicious and that stat that To extents one hundred and fifty one records good. That is the right answer So here we see one extent Well, this is an extent fine a maximum extent of one indicating that this deer end is for Extents zero and one and we see a block here good Let's go back to my test program and I am going to set a good high number so Rand that Stat that Twelve extents one five oh one records, which is exactly what we expect after writing to record one five oh oh One disc block. So what do we have in the file system? We have two deer ends one for extent zero and one for extent Eleven is that correct should that be extent one? I think it's all right because if we try to do anything with extent one Then the value will be bumped when we write back any modified FCB So I think that's good. I think that is actually working which is honestly about damn time Okay, uh just I Don't actually know whether I Don't hang on. I can't think about more than one thing at a time at the moment. I don't know whether LLVM moss has got a to I it does not have a to I unless I haven't Allocate it Haven't declared it stood live. Yeah, it's not there. Let's try Sturred hole No They must LLVM moss doesn't have a awful lot of runtime library like this is it your few string functions We've got a tiny amount of studio. We've got a tiny amount of stud live Okay, but we don't have an eight. We don't have a sturthole or an a to I so let's just write one V equals V times 10 V Plus equals C minus Zero and like you to admire all the amazing error detection there Okay Because that made our program Not so bad The code produced Varies enormously from very good to not good And it's also in line day to I There's a multiply and struck a multiply routine. It's pulled in there This is our main which is I hope it's our main because it's huge You can see it calling open file Make file here it's Fetched command line It's interesting Let's fetch the first byte at command line It should be putting it into a pointer here it is it's putting it into a pointer. It sometimes does very odd things Here it's doing the multiply by 10 Yeah Anyway, it'll work Okay, so That was stupid We're using the fcb here for the file name and the which means that the command line is actually contains the file name so let's just make a Fcb so Zero E four five six seven eight nine ten eleven nought nought nought Empty nought nought nought So I should be able to type now a record number Good. We've got our file So round 100 That seems odd okay, uh I was hoping to get more done, but No, actually, I thought that I had forgotten to call a to I here and was not setting the Value properly So this will print the record number it has passed So this will keep reading characters until the end of the line It's more or less right to be honest. Okay, it has tried to write to That's getting the right value See, it's it's got the record number correctly and Write random is returning a zero which means everything should be fine But that is never getting bigger See, it's only ever writing the first record Also, why is there garbage up at the top here at the top of the file system? That's wrong That's extremely wrong. I mean Yeah, you see it cannot load the bedoss something terrible has happened and It's written garbage everywhere So here's our program Here is the FCB That we've created that looks right allocation map Four bytes. Yeah, that's fine Then we have the relocation data. So my thought now is that this is going wrong Yeah, that's corrupted the file system again. You can see that this has disappeared That this has gone wrong because It's trying to write to a file already exists that we have actually been testing But this was kind of working previously Okay, well, let's go and Let's find Do we have our deep? We do have a debug. Does it print numbers? No Facts, let's just get rid of debug because we've probably passed that at this point Just simple trace messages won't be terribly useful and also We should have This should be an improper error message by us We have a routine for writing strings, I know because I wrote it here Okay, well that hasn't actually helped but It's nice a bit of cleanup now and again Okay, let's put a Stop there. Okay brand 1000 Continue a round 1000 Converts the random access record number to M. E. R. Well, let's take a look at our FCB. Oh That's kind of interesting There is no record number here because Because I screwed up this But this does mean that writing to record zero is Corrupting the file system So so happens that we are in just the right place to debug this. So let's go through this So we get the parameter and we do all the maths we know this math bit works Okay, so we've put them in 11 and 12 so extent zero module zero and The current record is Zero so do we need to switch from another extent? Well you compare these They are equal we compare these They are equal therefore We skip this whole chunk code here and go straight to here Update the record Count Mark the FCB as modified Here's our FCB record count of one Current record zero no blocks allocated. So we seek to the block. I bet my seek code is What's the phrase? bollocks Okay, get the FCB block get the block index Okay, so we figure out the shift value the shift is three This is how much we need to shift the extent number put in X Get the current extent mask, which is oh one Get the current extent and and the two together Oh Shift left to get the allocation map start by three We get a zero and stash in temp to Get the current record, which is the which is going to be zero Yep Get the block shift into X Which is four and shift it right to get the the index into the allocation map We now add on The extent start index zero Are we a big disc? We are not So we get the index into the allocation map by adding on the offset Which is now 16. Yep and return What's wrong about that? So we're now getting the fcb block into x a It's this isn't it I screwed this up that starts at one two bc Okay Set the current block number in the fcb To x a right x a is oh f. This is the block number. We are trying to write so a to y x to a Push Y to a Yep push Get the block index in Y Which is one zero Pull oh f. That's the low bite Actually, we know this worked because we saw the oh f in the allocation map But the actual sector right was happening in the wrong place So where do we go from set fcb block? here seek to block so get sequential sector number is Compute the sex a number of the block into x of the block currently in x a X a zero okay, okay That's why it's not working So x wants to be the high bite But we're using x here. This is a waste of time We know these are free because that's what we were using before okay, so LDA 10 plus zero Plus one that goes Here One I mean it's miserable, but it should at least work Well, that is the wrong value. It's just parsed But it hasn't corrupted the file system and we have a Okay, so the print routine I'm using has obviously got this wrong No, it's nascent. No, it hasn't this is the same mistake. I made before This is printing the wrong fcb Okay, but that's worked that has created multiple extents It's also just new file system Number of records is correct number of blocks is correct. So let's 10,000 Okay start that And that's that number too big I think it was actually too big This is showing the number of records in the file Which can go up to? Well, it should go up all the way up to 64k See see that's allocated another block and Lots more extents. Ah I know what happened No, I don't know what happened I was about to say that I think it ran out of directory entries But no, it shouldn't have created consecutive directory entries. We should have gone from Zero all the way up to Yeah, here we go. So we go here's a dat with extents zero o e o seven One f so it doesn't have to create the ones in between so let's make a Bigger one doesn't like 8,000 Interesting Very interesting. Okay, that worked that worked Um Just thinking about random numbers. I bet this will work Yep bet this won't yeah This means that my arithmetic is wrong. Oh, yes, let's take a look at the file Yes, it is trying to create Modules But I believe it's getting confused in places Yeah, here's a module to Okay Let's just wipe the file system Okay Rand 10,000 and it hangs right one three F F Reset continue 10,000 okay, we're here now Our FCB is at still one ADC and here we can see The current record and here is the random access pointer so quite a large value So we take the we figure out the current record and Put it in the Current record field We get the low byte of the extent and I believe this works by Doing this stuff Okay, now we fetch the high byte to seven of the the record number Shift it for gives us two and stores We saw actually The relevant values in the file system So I kind of think this code that the arithmetic works and it's something that's wrong with open file create file Anyway, we are now doing the comparisons We have decided that we need to switch DRNs, which is correct So we push those we call close file We update S2 With to which is the value we wanted we call open file this should fail it has We call create file that should succeed it has no error So we go here Okay, let's take a look at our FCB. We see that We are indeed on module to extent OE Current record 1.0 it should have created that file on disk because that's what create file should have done it should have Allocated a directory entry for it wait a minute wait a minute. I think This might be working and this is actually stat bug So this is the stat source code Here here is where we Here is where we are calculating the We are scanning the directory and we are completely ignoring the S2 field Okay So Let's fix this Extents can now be a 16-bit value Here we are loading. We're scanning the directory figuring out what all the file systems are here We are determining the number of records and extents in the on the file When scanning the file system, we're looking for the highest extent number and we're just looking at the extent field so We actually want to do a directory entry S2 times 32 plus DEX So and I will put this here No member named S2 in there and Yep, I called it something else So this should be That actually needs fixing in the header wait a minute Because calling S2 S brackets one is confusing Okay black file system grand ten thousand You got a file and that's wrong interesting This is producing Tirely the wrong Why is that getting a zero wait a minute? I'll control block. Okay, so we want S2, which is the second S byte Which would be this one? Is my dear instructor wrong user number 11 bytes of file name EX S1 S2 You know what? I am gonna fix that which involves rebuilding the MOS SDK, but that's a matter of moments Doesn't rebuild LLVM. Oh, that does not take mere moments. Okay, and Change that to S2. Oh, I know what it's doing. I know what it's doing It is It only it skips file names it's seen before which of course happens Before it does this calculation, so it's only ever looking at the first No, that's not right It does indeed look for files in the Array and deduplicate and We then Yes, we actually Look up the No, it should be going through this every time So why are we only seeing the file once? Have a routine here Okay, so this should print the file name of every dear entities so we should be able to do stat star star and It sees bitmap lots of times. I seriously need to clean up those headers They should be called the same thing. Okay, that's that star star Right and there it's seen the files and then it prints them Okay, so Rand 10,000 stat that Sees that once Should be seeing it more often star Sees that once Okay, my guess is I do think I know what's going on So putting a question mark in the extent field Causes it to return well as it says in the comment all extents not just the first and that is to find in the Documentation If the expite is also checked normally it should be set to zero if it's set to question mark then all suitable extents are matched If the expite is set to zero we also and this is important Want to put a question mark in the s2 byte But we don't we can't rely on the user doing this because the documentation doesn't say the user has to do this So we're going to find our Set up fcb for find Get all extents clear module byte in fcb Get all extents put a wild card byte in fc in fcb In fact, we know that a is a question mark so Okay, and there is my dat at 79 extents 10,001 Records so that file is actually Technically 10,001 times 128 bytes long Let's try adding another No, I can't add another zero because we'll run out of Bit but that should work. So that is a long file You should go all the way up to 65535. That's a bug I Can tell by the fact that it is allocated one block that it has I believe actually worked However the arithmetic in stat for Here we go fe records has just rolled over so So, yeah, that was bad. I think I can change that by doing this at the expense of much worse code 65535 stat that And it's still not right something's doing arithmetic in 16-bit precision I am going to just leave that for now because this is stupid and I'm getting tired But I believe that we are now correctly writing Random access files Reading is basically the same but easier The one I don't want to do is filled right, but we're going to have to But I'm going to deal with this next time. So good night


Hi! Happy Saturday! Welcome back to my Saturday story. A question to you again. What is your wife to you? A queen? Or a princess? Or neither? Let me share this Saturday story with you. I don't want you to answer this question now. Please answer this question at the end of the story. Once upon a time there lived a farmer who had a daughter. He loved her a lot. He felt as if Goddess Lakshmi came into his family when she was born. He took very good care of her. He always gave her whatever she asked for, though he was not well to do. And he rather worked extra hard to earn money so that he could buy things for his daughter. He never allowed anyone, not even his wife, to say anything that would hurt his daughter. He treated her like a princess with so much love to the extent that his relatives and others in the village even felt jealous of her. And for her, her father was a real hero, an able man with a kind and loving heart. And she was always her father's daughter. Years passed by. She attained a manageable age. So he looked for a good man from a night-bearing village who is also a farmer and got her married to him. And soon after marriage, she had to leave her village and go to her husband's place. Though her husband was a good man, he was not like her father. He also worked hard in the field during the good years when there was a bountiful harvest. He could buy all the things that the family wanted. But during the bad years, he could not buy that she wanted for her and her children. So they also used to have regular quarrels and suddenly there were times when they were upset with each other. He was nowhere near her father. Forget about being a hero. And for him, with all the constant nagging from her, she was neither a queen nor a princess. But they continued to live together and raise their children with love and care. One day, the farmer wanted to visit his daughter's family.  And he was shocked to see how his daughter grew so old so fast. So with deep sorrow in his heart and trying his best to hide that, he kept a happy face and inquired from his daughter. My beloved daughter, tell me what could I do for you so that your family could be happier. She did not want to be burdened on her father and she did not want her father to take any more pain because of her. So she told him, Papa, I'm so happy here with my husband and children. My husband is a very caring and loving person. He's hard-working too. He's taking good care of me and my children. I'm so blessed to have him as my husband. Just do one thing. Please pray that there could be good rains this year so that my husband can harvest a good crop. He understood his daughter and appreciated her for her maturity. He returned home praying for his daughter's happiness and her family's prosperity with good rains and bountiful harvest. Her husband, who was very much worried whether she would complain against him with all those grievances that she used to nag him with, was surprised how she saved him and protected the honor and dignity of the family. After her father left, he walked up to his wife, looked into her eyes with tears in his own eyes.  Now tell me, what is your wife to you? A queen or a princess or neither or both? She deserves to be one if not both. It is not the riches that would make her feel so. It is your love, your understanding and your treatment that would make her feel so. Yes, there will always be differences between you and her. Yes, she might not accept you talking anything against her father who always made her feel like a princess. But believe me, she would not also accept her father talking anything against you. It is she who would be coming with you till the last day and you are the whole world to her and she could be of us too. All that is needed is a bit more of understanding, a little more of love and compassion, especially during these days of stress and turmoil caused by the COVID-19 pandemic.  Remember, you are awesome. Thank you for watching this video. See you again next Saturday with another Saturday story. If you like this story, please do visit my YouTube channel and subscribe to it. Thank you.